jgero / roesena-app

Cross platform Web-App with user-created content and event manager
https://rösena.de/
0 stars 1 forks source link

tag input inserting partial tag #349

Closed jgero closed 2 years ago

jgero commented 2 years ago

When typing in the tag input line and hitting "ENTER" the partial tag from the input gets inserted and the first suggestion from the dropdown. This is because as soon as the input element has focus the dropdown opens and has focus on the first element. When hitting enter now this first element gets inserted. There would be multiple possible desired behaviors:

  1. The dropdown does not have focus on an element before pressing "arrow down" on the keyboard. When the dropdown now has focus only the dropdown value will be added. This may not be the best solution, because once there is focus on a element in the dropdown, how do you lose dropdown focus and just enter the input values?
  2. Items in the dropdown only get added when an actual click into the dropdown happens. This would make the forms not usable by just the keyboard, but that may not be an issue, because the app is used almost exclusively via mobile device.