1
0
mirror of synced 2024-11-25 06:16:08 +03:00

don't display a hidden input on destroy

This commit is contained in:
Jonathan Toms 2014-12-01 22:45:34 -05:00
parent 39394e2ee8
commit 3acc0c4e58

View File

@ -870,17 +870,21 @@ the specific language governing permissions and limitations under the Apache Lic
select2.container.remove();
select2.liveRegion.remove();
select2.dropdown.remove();
element
.show()
.removeData("select2")
.off(".select2")
.prop("autofocus", this.autofocus || false);
if (this.elementTabIndex) {
element.attr({tabindex: this.elementTabIndex});
element.removeData("select2")
.off("select2");
if (!element.is("input[type='hidden']")) {
element
.show()
.prop("autofocus", this.autofocus || false);
if (this.elementTabIndex) {
element.attr({tabindex: this.elementTabIndex});
} else {
element.removeAttr("tabindex");
}
element.show();
} else {
element.removeAttr("tabindex");
element.css("display", "");
}
element.show();
}
cleanupJQueryElements.call(this,