aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-08-12 10:05:04 -0400
committerScott González <scott.gonzalez@gmail.com>2011-08-12 10:05:04 -0400
commit930c65011c28dfef4b206d476d6dd1da2c131bce (patch)
tree9126d4ecb140efd30727c89402e282ce78ed8091
parent7c15d3c19f9cdde9cc82ac0486a93b01ec03eb6b (diff)
downloadjquery-ui-930c65011c28dfef4b206d476d6dd1da2c131bce.tar.gz
jquery-ui-930c65011c28dfef4b206d476d6dd1da2c131bce.zip
Draggable: Only run iframeFix logic if the option is truthy. Fixes #7632 - Draggable: iframeFix always runs with old versions of jQuery.
-rw-r--r--ui/jquery.ui.draggable.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 6660d2bee..72f394076 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -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;