In my web app I want to give the possibility of submitting every form with Ctrl + Enter shortcut.
What is better:
- submit the form with keyboard only when one of the fields of this form is focused
- remember the last active form (in which an element was focused), then on Ctrl + Enter (if nothing is active at the moment) check that last active form is completed: if yes - submit it, if no - focus on missing field and highlight it.
I like the second option more because it also deals with multiple forms on a page and overall looks more flexible.
I am looking for your advice.
No comments:
Post a Comment