Commit ec7ea3fb authored by John Resig's avatar John Resig

Adjust fallback top/left to just be 0 for disconnected DOM nodes. Follow-up to...

Adjust fallback top/left to just be 0 for disconnected DOM nodes. Follow-up to cf672a2e, thanks to @jitter for the catch.
parent 49f6f341
...@@ -25,7 +25,7 @@ if ( "getBoundingClientRect" in document.documentElement ) { ...@@ -25,7 +25,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
box = elem.getBoundingClientRect(); box = elem.getBoundingClientRect();
} catch(e) { } catch(e) {
box = { top: elem.offsetTop, left: elem.offsetLeft }; box = { top: 0, left: 0 };
} }
var doc = elem.ownerDocument, var doc = elem.ownerDocument,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment