Merge pull request #2838 from RustyToms/do_not_display_hidden_input
don't display a hidden input on destroy
This commit is contained in:
commit
a11cfdd11c
22
select2.js
22
select2.js
@ -870,17 +870,21 @@ 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
|
element.removeData("select2")
|
||||||
.show()
|
.off("select2");
|
||||||
.removeData("select2")
|
if (!element.is("input[type='hidden']")) {
|
||||||
.off(".select2")
|
element
|
||||||
.prop("autofocus", this.autofocus || false);
|
.show()
|
||||||
if (this.elementTabIndex) {
|
.prop("autofocus", this.autofocus || false);
|
||||||
element.attr({tabindex: this.elementTabIndex});
|
if (this.elementTabIndex) {
|
||||||
|
element.attr({tabindex: this.elementTabIndex});
|
||||||
|
} else {
|
||||||
|
element.removeAttr("tabindex");
|
||||||
|
}
|
||||||
|
element.show();
|
||||||
} else {
|
} else {
|
||||||
element.removeAttr("tabindex");
|
element.css("display", "");
|
||||||
}
|
}
|
||||||
element.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanupJQueryElements.call(this,
|
cleanupJQueryElements.call(this,
|
||||||
|
Loading…
Reference in New Issue
Block a user