Draggable: Only run iframeFix logic if the option is truthy. Fixes #7632 - Draggable: iframeFix always runs with old versions of jQuery.

This commit is contained in:
Scott González 2011-08-12 10:05:04 -04:00
parent 7c15d3c19f
commit 930c65011c

View 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;