mirror of
https://github.com/jquery/jquery.git
synced 2026-01-24 16:28:06 -05:00
Adjust fallback top/left to just be 0 for disconnected DOM nodes. Follow-up to cf672a2e7a, thanks to @jitter for the catch.
This commit is contained in:
@@ -25,7 +25,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
|
||||
box = elem.getBoundingClientRect();
|
||||
|
||||
} catch(e) {
|
||||
box = { top: elem.offsetTop, left: elem.offsetLeft };
|
||||
box = { top: 0, left: 0 };
|
||||
}
|
||||
|
||||
var doc = elem.ownerDocument,
|
||||
|
||||
Reference in New Issue
Block a user