Browse Source

cleaner way to detect older IE

Igor Vaynberg 12 years ago
parent
commit
def8adca7c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      select2.js

+ 3 - 2
select2.js

@@ -1233,8 +1233,9 @@ the specific language governing permissions and limitations under the Apache Lic
                 });
                 });
             }
             }
 
 
-            // ie requires an iframe shim to cover controls like selects
-            if($.browser.msie) {
+            // IE requires an iframe shim to cover controls like selects
+            if($.support.opacity) {
+                // a hack to detect older IE browsers - they do not support opacity
                 undermask=$("#select2-drop-undermask");
                 undermask=$("#select2-drop-undermask");
                 if (undermask.length==0) {
                 if (undermask.length==0) {
                     undermask = $(document.createElement("iframe"));
                     undermask = $(document.createElement("iframe"));