Re: [webcomponents] Adjusting offsetParent, offsetTop, offsetLeft properties in Shadow DOM

On 3/28/13 12:49 PM, Elliott Sprehn wrote:
> var rect = node.offsetParent.getBoundingClientRect();
> = computePosition(rect);
> = computePosition(rect);

Nothing guarantees the result of this to be sane today, unless you have 
extra information about the precise styles of "node" and 
"node.offsetParent", as far as I know....

Or put another way, I think the code cited above is just wrong and 
shouldn't be written that way.

> Anyway I think the fundamental question here is: Is it okay to make
> offsetParent totally useless (always returns <body>) in Toolkit apps?

It's already pretty close to totally useless as far as I can tell....


Received on Thursday, 28 March 2013 17:30:40 UTC