[x] I checked the documentation and found no answer
[x] I checked to make sure that this issue has not already been filed
Explanation
Your code example to allow using ENTER for form submitting
tagify.on('keydown', onTagifyKeyDown);
function onTagifyKeyDown(e) {
// Check if 'e' is a KeyboardEvent
if (e instanceof KeyboardEvent) {
if (e.key === 'Enter' && // "enter" key pressed
!tagify.state.inputText && // assuming user is not in the middle of adding a tag
!tagify.state.editing) { // user not editing a tag
// Add a small delay to ensure Tagify has finished processing before submitting
setTimeout(() => formElm.submit(), 0); // Use 0ms to allow the event loop to process
}
}
}
What is the expected behavior?
What is happening instead?
e.key is undefined
I need to use e.detail.event.key instead (google Chrome 130.0.6723.117)
Prerequisites
Explanation
Your code example to allow using ENTER for form submitting
What is the expected behavior?
What is happening instead?
e.key is undefined
I need to use e.detail.event.key instead (google Chrome 130.0.6723.117)