-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
-
With v 0.15.2 the create function is triggered twice if instead of hitting enter you mouse click on the "Add...option" label.
Is this a bug? Is there a work-around?
Maybe the real question is is "Add...option" selected so that enter should work (and click merely re-selects the new option with no effect)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
I found a solution for that version (0.15.2)
Go to this line of code:
$dropdown.on('mouseup click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });
Remove the "mouseup":
$dropdown.on('click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });
Works!
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
This works <3. Just to be explicit, this change must be performed in whatever file holds the code for selectize. If a minified version of the code, you'll see something like this
r.on("mouseup click","[data-selectable]",function(){return e.onOptionSelect.apply(e,arguments)})
Beta Was this translation helpful? Give feedback.