mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-11 05:43:44 -05:00
When you hit enter while an input in a form is in focus, your browser finds the first button in the form, and carries out that action. So, for non-js users, we added a hidden submit button with a value of "unknown" to reflect that we don't know the intention of the user. However, with JS enabled, this ambiguity doesn't exist - there's only submit button and forms to fill in at a time, and non-visible fields aren't even submitted at all. We can remove the unknown button, supporting enter as submit properly. If the user is on one of the grey button states, with no submit, it'll press the first button, and go to the new template / move to existing folder dialog. That's fine enough.