Skip to content

Commit

Permalink
do not autofocus comment quote/edit
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Sep 27, 2020
1 parent 08b2ff2 commit 1c3f8bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spirit/comment/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def __init__(self, user=None, topic=None, *args, **kwargs):
self.topic = topic
self.mentions = None # {username: User, }
self.polls = None # {polls: [], choices: []}
# Do not autofocus (when there's initial/instance),
# we don't know where the cursor should be,
# and that'd need JS anyway
self.fields['comment'].widget.attrs['placeholder'] = _("Write comment...")

def get_comment_hash(self):
Expand Down

0 comments on commit 1c3f8bd

Please sign in to comment.