mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
draggable: fixed nasty IE related scrolling bug - funny IE includes scroll if you call offset() on <html>
This commit is contained in:
parent
2619fc8073
commit
bba3d31e82
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user