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:
parent
49f6f34181
commit
ec7ea3fba1
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue