sindresorhus/refined-github




The issue has been closed
In `avoid-accidental-submissions`, focus primary button instead of next field #4462
fregante posted onGitHub
I think avoid-accidental-submissions
feels a little strange, like slipping on a banana peel. What if we focus the submit button instead of the text area?
<img width="435" alt="Screen Shot 9" src="https://user-images.githubusercontent.com/1402241/121675395-8b627200-cadd-11eb-8bd2-a35b97204076.png">
Pros:
- submission is possible with an additional plain [Enter] press, without using ctrl/cmd
- maybe it feels less broken
Cons:
- if it was accidental, going back now means pressing shift-tab several times instead of once
An alternative would be to add a temporary "confirm" button right below it and focus it.
<img width="724" alt="Screen Shot" src="https://user-images.githubusercontent.com/1402241/121675762-0a57aa80-cade-11eb-8c24-b428807d8f44.png">
The message would still be welcome everywhere.