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

Empty (no value) edited tag is not removed when pressing `esc` key #1282

Closed billy0222 closed 10 months ago

billy0222 commented 10 months ago

Prerequisites

💥 Demo Page

https://codepen.io/vsync/pen/wvGaKxd

Explanation

billy0222 commented 10 months ago

Thanks a lot! Can you also fix the second problem?

yairEO commented 10 months ago

Well that is a separate thing for which I will need to create a separate ticket and look into it.

I've created a new issue according to your report: https://github.com/yairEO/tagify/issues/1286

billy0222 commented 10 months ago

The new release throw an error on the demo page again.

Empty (no value) edited tag is not removed when focus out.

Uncaught TypeError: Cannot read properties of undefined (reading 'trim') at .onEditTagDone (tagify:26:45526) at .onEditTagBlur (tagify:26:33430)

yairEO commented 10 months ago

@billy0222 - Thanks a lot for reporting, am fixing it now

billy0222 commented 10 months ago

When the dropdown list is re-filtered and the suggestions list is visible again (previously hidden since no match), then press "esc", the tag is removed, but the dropdown list is still shown.

Edited: Or you can just type "a" then press "esc" to reproduce the bug.