Steps to replicate the issue (include links if applicable):
- Go to the OOUI demo page https://doc.wikimedia.org/oojs-ui/master/demos/
- Scroll to MenuTagMultiselectWidget (initially selected, preset options)
- Type something invalid, e.g. "foobar"
- Click outside of the field, so that it loses focus
- Focus the field again by clicking
- Hit enter
What happens?:
A card will disappear from the widget, and whatever you typed will also be cleared.
What should have happened instead?:
This I don't know. I would say that hitting enter should not change (add or remove) any cards; I guess the main question is what should happen to the invalid text, i.e., whether it should be cleared or not. Maybe it shouldn't, but again, I don't know for sure.
Software version (skip for WMF-hosted wikis like Wikipedia):
OOUI v0.46.3