don't display a hidden input on destroy
This commit is contained in:
parent
39394e2ee8
commit
3acc0c4e58
@ -870,10 +870,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
select2.container.remove();
|
select2.container.remove();
|
||||||
select2.liveRegion.remove();
|
select2.liveRegion.remove();
|
||||||
select2.dropdown.remove();
|
select2.dropdown.remove();
|
||||||
|
element.removeData("select2")
|
||||||
|
.off("select2");
|
||||||
|
if (!element.is("input[type='hidden']")) {
|
||||||
element
|
element
|
||||||
.show()
|
.show()
|
||||||
.removeData("select2")
|
|
||||||
.off(".select2")
|
|
||||||
.prop("autofocus", this.autofocus || false);
|
.prop("autofocus", this.autofocus || false);
|
||||||
if (this.elementTabIndex) {
|
if (this.elementTabIndex) {
|
||||||
element.attr({tabindex: 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.removeAttr("tabindex");
|
||||||
}
|
}
|
||||||
element.show();
|
element.show();
|
||||||
|
} else {
|
||||||
|
element.css("display", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanupJQueryElements.call(this,
|
cleanupJQueryElements.call(this,
|
||||||
|
Loading…
Reference in New Issue
Block a user