Skip to content

Commit

Permalink
Do not autofocus on the comments form.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Feb 12, 2024
1 parent 3f2273b commit 2055663
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions news/3623.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Do not autofocus on the comments form.
[maurits]
3 changes: 3 additions & 0 deletions plone/app/discussion/browser/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
"author_username",
"title",
)
# We do not want the focus to be on this form when loading a page.
# See https://github.com/plone/Products.CMFPlone/issues/3623
enable_autofocus = False

def updateFields(self):
super().updateFields()
Expand Down

0 comments on commit 2055663

Please sign in to comment.