PeteAUK / warscroll-designer

A Warscroll creation tool for the Age of Sigmar system (issue tracker)
0 stars 0 forks source link

Behaviour of enter key in Keywords modal #12

Closed exonian closed 1 year ago

exonian commented 1 year ago

Describe the bug Hitting enter while using the keywords modal closes the model without saving. This was unexpected, and therefore a little frustrating.

To Reproduce Edit Keywords, add a keyword, hit Enter, the modal closes and no keywords are added

Expected behaviour I was expecting hitting enter to save the modal and therefore its contents. I guess this is as much a feature request as it is a bug.

Desktop (please complete the following information):

PeteAUK commented 1 year ago

I've just reworked the handling of the enter key on the keyword dialog.

Hitting enter with text in the input will automatically focus on the next input (faux tabbing) Hitting enter when the input is empty will instead submit the form

Additionally upon opening the keywords dialog, the first empty input will be focused.

exonian commented 1 year ago

Ooh yes that's lovely behaviour, works brilliantly. Thanks!