yairEO / tagify

🔖 lightweight, efficient Tags input component in Vanilla JS / React / Angular / Vue
https://yaireo.github.io/tagify/
Other
3.55k stars 436 forks source link

"Uncaught (in promise) TypeError: t is null" when pressing Tab key with empty input and dropdown is shown #1348

Closed Koopzington closed 5 months ago

Koopzington commented 6 months ago

Prerequisites

💥 Demo Page

https://jsbin.com/jekuqap/edit?html,js,output

Explanation

An uncaught error is logged in the console when the dropdown is shown, the input is empty and the user presses the Tab key, most likely because it couldn't map '' to a value.

Uncaught (in promise) TypeError: t is null
    getMappedValue suggestions.js:456
    onKeyDown suggestions.js:92
    promise callback*onKeyDown suggestions.js:55
    binding suggestions.js:32
    setTimeout handler*show dropdown.js:120
    onFocusBlur events.js:231

Even though it breaks nothing i figured this error should be prevented.