diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-11-06 14:52:25 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-11-06 14:52:25 +0000 |
commit | bba3d31e8286a01f5ee42f73c17766c3081367fc (patch) | |
tree | 018f469abae24c7a16dff11ccbfb1b3f8516d73a /ui | |
parent | 2619fc8073074f3de84559a3a0ae8c5076664aa9 (diff) | |
download | jquery-ui-bba3d31e8286a01f5ee42f73c17766c3081367fc.tar.gz jquery-ui-bba3d31e8286a01f5ee42f73c17766c3081367fc.zip |
draggable: fixed nasty IE related scrolling bug - funny IE includes scroll if you call offset() on <html>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.draggable.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index 3323f58ad..f8f3ebd8f 100644 --- a/ui/ui.draggable.js +++ b/ui/ui.draggable.js @@ -109,7 +109,8 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { this.offsetParent = this.helper.offsetParent(); var po = this.offsetParent.offset(); //Get the offsetParent and cache its position - if(this.offsetParent[0] == document.body && $.browser.mozilla) po = { top: 0, left: 0 }; //Ugly FF3 fix + if(this.offsetParent[0] == document.body && $.browser.mozilla) po = { top: 0, left: 0 }; //Ugly FF3 fix + if(this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie) po = { top: 0, left: 0 }; //Ugly IE fix this.offset.parent = { //Store its position plus border top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) @@ -240,7 +241,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { }; }, _generatePosition: function(e) { - + var o = this.options; var position = { top: ( |