diff --git a/src/selectize.js b/src/selectize.js index 41627e160..ba6b1a740 100644 --- a/src/selectize.js +++ b/src/selectize.js @@ -1752,6 +1752,7 @@ $.extend(Selectize.prototype, { self.$input .html('') .append(revertSettings.$children) + .removeAttr('tabindex') .attr({tabindex: revertSettings.tabindex}) .show(); diff --git a/test/api.js b/test/api.js index 3166f2170..2ac35dce9 100644 --- a/test/api.js +++ b/test/api.js @@ -549,6 +549,11 @@ expect(test.$select.html()).to.be.equal(children); expect(test.$select.attr('tabindex')).to.be.equal('9999'); }); + it('should remove tabindex if it was originally undefined', function() { + var test = setup_test('