Prerequisites
💥 Demo Page
https://jsbin.com/kedanixiso/edit?html,js,console,output
https://jsbin.com/noxuzusave/1/edit?html,js,console,output
Explanation
Go on the demo page and tab on the tagify input so that the dropdown opens. Continue tabbing, the first value is inserted. This should not happen because the first value ("1") is already present in the input. This happens because when tabbing (and only when tabbing, this does not happen when using the mouse to select) the name is passed as value instead of the real value in transformTag. This also has the side effect or creating a corrupted output list.
I suggest not to fix this, but simply to disable select with the tab key cause this is an issue for impaired users (how are they supposed to escape the dropdown after it opened?) I know they can use the esc key it but it is not really intuitive, it would be better to close the dropdown with another tab click, and if the user really wants to select something, he obviously will do with arrows/enter keys.
Prerequisites
💥 Demo Page
https://jsbin.com/kedanixiso/edit?html,js,console,outputhttps://jsbin.com/noxuzusave/1/edit?html,js,console,output
Explanation
Go on the demo page and tab on the tagify input so that the dropdown opens. Continue tabbing, the first value is inserted. This should not happen because the first value ("1") is already present in the input. This happens because when tabbing (and only when tabbing, this does not happen when using the mouse to select) the name is passed as value instead of the real value in
transformTag. This also has the side effect or creating a corrupted output list.I suggest not to fix this, but simply to disable select with the tab key cause this is an issue for impaired users (how are they supposed to escape the dropdown after it opened?) I know they can use the
esckey it but it is not really intuitive, it would be better to close the dropdown with another tab click, and if the user really wants to select something, he obviously will do with arrows/enter keys.What is the expected behavior?
Inserting a value with tab key should work normally
What is happening instead?
The name is passed instead of the value in
transformTag