From a0856efef3c392d413aa6cd9bd084dc601a337c6 Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 20 Oct 2011 16:57:47 -0400 Subject: Widget: Added window and document properties. Fixes #7801 - Widget: Add document and window properties. --- ui/jquery.ui.dialog.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ui/jquery.ui.dialog.js') diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 46320426a..9c9a9b6fc 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -372,8 +372,7 @@ $.widget("ui.dialog", { _makeDraggable: function() { var self = this, - options = self.options, - doc = $( document ); + options = self.options; function filteredUi( ui ) { return { @@ -396,8 +395,8 @@ $.widget("ui.dialog", { }, stop: function( event, ui ) { options.position = [ - ui.position.left - doc.scrollLeft(), - ui.position.top - doc.scrollTop() + ui.position.left - self.document.scrollLeft(), + ui.position.top - self.document.scrollTop() ]; $( this ) .removeClass( "ui-dialog-dragging" ); -- cgit v1.2.3