-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Remove .active class on items when removed with the X from remove_button plugin #1216
Comments
Is this related to #1212? |
Hi, I just read #1212 and tested this issue as well, and can confirm they are related. Using "Delete" or "Backspace" on a selected item is causing the same behavior as using the X-icon: the .active class will not be removed. I also tried the patch mentioned by @quintstoffers in #1212, but it's not working for me. The change I did just to get it work for me, will also work for solving #1212. |
@Trinitonn Did you add the plugin to the array of plugins passed to your |
@quintstoffers Yes, I did add the plugin to the array and I also added an alert into your plugin to confirm it's running. By the way, I'm using the standalone version: |
…and then re-added in "multiple" mode Fixes selectize#1212 and selectize#1216.
…and then re-added in "multiple" mode Fixes issues selectize#1212 and selectize#1216.
…and then re-added in "multiple" mode Fixes issues selectize#1212 and selectize#1216.
…and then re-added in "multiple" mode Fixes issues selectize#1212 and selectize#1216.
closing stale issues older than one year. |
Hi,
Thank you for a great plugin!
I encountered a situation using the remove_button plugin. When you press the X-icon on a selected item it removes the item from the selected list, however it does not remove the .active class on this element.
Try this by:
Add multiple items
Click on one of them so it gets the .active class
Remove the active one by pressing the X-icon
Select another item in the already selected item list, so that one gets the .active class
Reselect the item you removed by using the X-icon
You will end up with two items which both are .active.
This is no bug, but the behavior is unexpected for me as an end user. For my case is just added a removeClass in the removeItem function like this:
if ($item.hasClass('active')) { idx = self.$activeItems.indexOf($item[0]); self.$activeItems.splice(idx, 1); $item.removeClass('active'); }
The text was updated successfully, but these errors were encountered: