Skip to content

Commit def8adc

Browse files
committed
cleaner way to detect older IE
1 parent 5d8f03c commit def8adc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

select2.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,9 @@ the specific language governing permissions and limitations under the Apache Lic
12331233
});
12341234
}
12351235

1236-
// ie requires an iframe shim to cover controls like selects
1237-
if($.browser.msie) {
1236+
// IE requires an iframe shim to cover controls like selects
1237+
if($.support.opacity) {
1238+
// a hack to detect older IE browsers - they do not support opacity
12381239
undermask=$("#select2-drop-undermask");
12391240
if (undermask.length==0) {
12401241
undermask = $(document.createElement("iframe"));

0 commit comments

Comments
 (0)