-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior with create and duplicates enabled #106
Comments
Hmm, I'm not seeing any errors. Do you get them with this example? |
I don't get errors with your example. It seems that it's actually a problem with the |
Hmm, I just tried without |
Would love to get this fixed. If you have any other steps and/or clues on how to reproduce the error, please let me know. |
Interestingly I can't get the error log to be thrown again for some reason. However, I can still replicate the behaviour of the issue reliably. Do the following:
I've uploaded an mp4 of this happening to my Dropbox: here. I'm trying again now and it actually occurs even with |
Awesome, I see what you're talking about now. Thanks! |
Thanks for your quick work! Unfortunately this isn't fully fixed: |
Hmm.
Could you describe what you mean by that? I'm not seeing any issues... wondering if your referring to the large gap that can appear between items after an item in the middle was deleted? |
Ah that may be my oversight. Yes upon closer inspection, it seems the elements are actually being deleted correctly, but elements right of the cursor are being pushed off to the right side of the input as you describe. Sorry for my over-eager bug reporting! I appreciate your responsiveness. |
It's all good. The solution for this is the input_autogrow plugin. |
Describe the bug
I've created a tom-select with
create: true, duplicates: true
. When removing a duplicate value from this tom-select (by pressing backspace), the deleted element isn't always at the caret position and sometimes deletes multiple copies of the duplicated value (while throwing an error, below).To Reproduce
Steps to reproduce the behavior:
Expected behavior
The element(s) should be deleted.
Additional context
Error message as follows (using latest dist):
The text was updated successfully, but these errors were encountered: