You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default behavior for browsers is to only trigger a change event on a <select> element when the selected value has changed. Expanding the drop down and re-selecting the currently selected item should not trigger a change event. However, Selectize will always trigger a change event when an item is chosen, regardless of whether or not it is the currently selected item.
Here is an example failing test case (events_dom.js):
describe('DOM Events',function(){describe('"change"',function(){it('should not be triggered when the selected item has not changed',function(done){vartest=setup_test('<select><option value="a" selected="selected">a</option></select>');varcounter=0;test.$select.on('change',function(){counter++;});Syn.click(test.selectize.$control).delay(0,function(){Syn.click($('[data-value="a"]',test.selectize.$dropdown)).delay(0,function(){expect(counter).to.be.equal(0);done();});});});});});
The text was updated successfully, but these errors were encountered:
The default behavior for browsers is to only trigger a
change
event on a<select>
element when the selected value has changed. Expanding the drop down and re-selecting the currently selected item should not trigger achange
event. However, Selectize will always trigger achange
event when an item is chosen, regardless of whether or not it is the currently selected item.Here is an example failing test case (events_dom.js):
The text was updated successfully, but these errors were encountered: