Skip to content

Commit

Permalink
Draggable: Only run iframeFix logic if the option is truthy. Fixes #7…
Browse files Browse the repository at this point in the history
…632 - Draggable: iframeFix always runs with old versions of jQuery.
  • Loading branch information
scottgonzalez committed Aug 12, 2011
1 parent 7c15d3c commit 930c650
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ui/jquery.ui.draggable.js
Expand Up @@ -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;

Expand Down

0 comments on commit 930c650

Please sign in to comment.