1
0
mirror of synced 2024-11-25 14:26:03 +03:00

Merge pull request #2838 from RustyToms/do_not_display_hidden_input

don't display a hidden input on destroy
This commit is contained in:
Kevin Brown 2014-12-10 15:33:04 -05:00
commit a11cfdd11c

View File

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