Quickly click to delete tag, there is a bug
Hello, there are the following two bugs 1). When entering the edit mode, change it to clicks: 1, enter the number 1, 2 becomes two tags, and quickly click the delete button, there is a chance to trigger the edit:start event method, and enter the number 1 or 2 again, it becomes Can't tag. 2). Double-click the input box, the console will prompt the message 'tag element doesn't exist'. please verify, thanks!
Sorry I don't know how to upload the video.
https://jsbin.com/becapidoqi/edit?js,console,output
sorry but I don't understand, what is the actual bug?
Sorry, this is the demo page. Enter the number 1, 2 becomes two tags,after triggering the edit:start event, you will find the following problems: 1). The first input content is deleted after generating the tag (it seems that the content already exists and is deleted). 2). Double-click the input box, the console will prompt the message 'tag element doesn't exist'.
please verify.
💥 Demo Page https://jsbin.com/tetixowayo/edit?js,console,output
https://user-images.githubusercontent.com/18025875/192176539-158fdcc1-49a1-4c35-9f90-eb6338494e9a.mp4
I've tried so many times to delete as fast as I could but I could not reproduce the bug (in your JSBIN)
Sorry to resurect an old issue but the same is happening here, it's easier to reproduce if you hold backspace to delete the tags.
@LucasCardoso-LC - please upload a video. I cannot reproduce this at all... I've tried adding several tags and holding the BACKSPACE key and it always perfectly removes them all and the value of the original input is in-sync.
I have also reproduced the issue and I am experiencing a similar problem.
Here is the issue I am facing:
When I quickly perform the following two steps after entering "1", the UI reflects both events, but the actual value change from the first event (deleting "1") is ignored.
- First event: Delete "1".
- Second event: Paste another value using cmd + v.
(Although the situation is different from the initially reported issue, both problems show that the value change from the first event is ignored.)
https://github.com/yairEO/tagify/assets/39703207/757b520e-e21e-4780-a250-f0d29126f267
@SongTeaheon - thanks! that helped a lot, now I can reproduce it. I will create a fix shortly.