When adding a new tag, addTagFromInput checks the validity of the input value, then, if valid:
- clears the input
- calls addTag
addTag then repeats the validity check, but after the input has been cleared.
This second check always fails for the UsersMultiselectWidget, because clearing the input fires a change event, which causes the menu to be cleared; and the validation checks whether value is in the menu. This means that the widget must accept arbitrary values, or else nothing can be entered.
(Incidentally, the second check only passes for the TitlesMultiselectWidget because the change handler clears the menu asynchronously on the next execution cycle, so addTag is called first.)
We can fix this by only clearing the input after a tag is successfully added.