remove undermask for ie since its no longer needed after #1414
This commit is contained in:
parent
d2dc771197
commit
48294f2aea
27
select2.js
27
select2.js
@ -1218,7 +1218,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
scroll = "scroll." + cid,
|
scroll = "scroll." + cid,
|
||||||
resize = "resize."+cid,
|
resize = "resize."+cid,
|
||||||
orient = "orientationchange."+cid,
|
orient = "orientationchange."+cid,
|
||||||
mask, undermask = undefined, maskCss;
|
mask, maskCss;
|
||||||
|
|
||||||
this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
|
this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
|
||||||
|
|
||||||
@ -1249,32 +1249,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// IE requires an iframe shim to cover controls like selects
|
|
||||||
if($.support.opacity === false) {
|
|
||||||
// a hack to detect older IE browsers - they do not support opacity
|
|
||||||
undermask=$("#select2-drop-undermask");
|
|
||||||
if (undermask.length==0) {
|
|
||||||
undermask = $(document.createElement("iframe"));
|
|
||||||
undermask.attr("src","about:blank");
|
|
||||||
undermask.attr("id","select2-drop-undermask").attr("class","select2-drop-undermask");
|
|
||||||
undermask.attr("allowTransparency", "true");
|
|
||||||
undermask.attr("frameborder", "0");
|
|
||||||
undermask.hide();
|
|
||||||
undermask.appendTo(this.body());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ensure the mask is always right before the dropdown
|
// ensure the mask is always right before the dropdown
|
||||||
if (this.dropdown.prev()[0] !== mask[0]) {
|
if (this.dropdown.prev()[0] !== mask[0]) {
|
||||||
this.dropdown.before(mask);
|
this.dropdown.before(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure the undermask is always right before the mask
|
|
||||||
if (undermask && mask.prev()[0] !== undermask[0]) {
|
|
||||||
mask.before(undermask);
|
|
||||||
}
|
|
||||||
|
|
||||||
// move the global id to the correct dropdown
|
// move the global id to the correct dropdown
|
||||||
$("#select2-drop").removeAttr("id");
|
$("#select2-drop").removeAttr("id");
|
||||||
this.dropdown.attr("id", "select2-drop");
|
this.dropdown.attr("id", "select2-drop");
|
||||||
@ -1282,8 +1261,6 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
// show the elements
|
// show the elements
|
||||||
maskCss=_makeMaskCss();
|
maskCss=_makeMaskCss();
|
||||||
|
|
||||||
if (undermask) { undermask.css(maskCss).show(); }
|
|
||||||
|
|
||||||
mask.css(maskCss).show();
|
mask.css(maskCss).show();
|
||||||
|
|
||||||
this.dropdown.show();
|
this.dropdown.show();
|
||||||
@ -1297,7 +1274,6 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
this.container.parents().add(window).each(function () {
|
this.container.parents().add(window).each(function () {
|
||||||
$(this).on(resize+" "+scroll+" "+orient, function (e) {
|
$(this).on(resize+" "+scroll+" "+orient, function (e) {
|
||||||
var maskCss=_makeMaskCss();
|
var maskCss=_makeMaskCss();
|
||||||
$("#select2-drop-undermask").css(maskCss);
|
|
||||||
$("#select2-drop-mask").css(maskCss);
|
$("#select2-drop-mask").css(maskCss);
|
||||||
that.positionDropdown();
|
that.positionDropdown();
|
||||||
});
|
});
|
||||||
@ -1325,7 +1301,6 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
|
|
||||||
this.clearDropdownAlignmentPreference();
|
this.clearDropdownAlignmentPreference();
|
||||||
|
|
||||||
$("#select2-drop-undermask").hide();
|
|
||||||
$("#select2-drop-mask").hide();
|
$("#select2-drop-mask").hide();
|
||||||
this.dropdown.removeAttr("id"); // only the active dropdown has the select2-drop id
|
this.dropdown.removeAttr("id"); // only the active dropdown has the select2-drop id
|
||||||
this.dropdown.hide();
|
this.dropdown.hide();
|
||||||
|
Loading…
Reference in New Issue
Block a user