]> source.dussan.org Git - jquery-ui.git/commitdiff
Draggable: Only run iframeFix logic if the option is truthy. Fixes #7632 - Draggable...
authorScott González <scott.gonzalez@gmail.com>
Fri, 12 Aug 2011 14:05:04 +0000 (10:05 -0400)
committerScott González <scott.gonzalez@gmail.com>
Fri, 12 Aug 2011 14:05:04 +0000 (10:05 -0400)
ui/jquery.ui.draggable.js

index 6660d2bee2ebd1fecea5b4cd8b555e81130ad37e..72f394076ea7cb8534c12366a0cd34315c8593c8 100644 (file)
@@ -80,15 +80,17 @@ $.widget("ui.draggable", $.ui.mouse, {
                if (!this.handle)
                        return false;
                
-               $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
-                       $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
-                       .css({
-                               width: this.offsetWidth+"px", height: this.offsetHeight+"px",
-                               position: "absolute", opacity: "0.001", zIndex: 1000
-                       })
-                       .css($(this).offset())
-                       .appendTo("body");
-               });
+               if ( o.iframeFix ) {
+                       $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+                               $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
+                               .css({
+                                       width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+                                       position: "absolute", opacity: "0.001", zIndex: 1000
+                               })
+                               .css($(this).offset())
+                               .appendTo("body");
+                       });
+               }
 
                return true;