| Issue 516550: | FOUC prevention shouldn't give back bogus answers during attachment inside imports | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Version: 46.0.2464.0 canary What steps will reproduce the problem? 1. load an HTMLImport that defines a custom element that queries its `offsetParent` in `attachedCallback` 2. make an instance of the custom element in the body What is the expected output? What do you see instead? The element should report its offsetParent as <body>. Instead, the offsetParent is null. In addition, if the body has style="position: relative;", the element sees this with getComputedStyle as position static. By the time of the import's load event, the expected information is reported. See the attached reduction's console output.
Aug 4, 2015
#1
sorv...@chromium.org
Aug 4, 2015
We're returning answers based on a style recalc that treats everything as display: none while loading. esprehn, word on the street is you have an idea in your head around how this should work. It'd be nice to have that attached to this.
Summary:
FOUC prevention shouldn't give back bogus answers during attachment inside imports
(was: Custom element defined in HTMLImport gets incorrect offsetParent and getComputedStyle data in attachedCallback)
Cc: o...@chromium.org
Aug 4, 2015
Fwiw, the workaround that Polymer will use for this issue is slight sugar around calling `requestAnimationFrame` in `attachedCallback`.
Aug 4, 2015
Tentatively esprehn?
Status:
Available
Owner: esprehn@chromium.org
Aug 4, 2015
Ultimately, it may make sense to have someone on the style team own it.
Cc:
mikelawt...@chromium.org sh...@chromium.org
Aug 4, 2015
(No comment was entered for this change.)
Cc:
tim...@chromium.org
Aug 5, 2015
(No comment was entered for this change.)
Labels:
-Cr-Blink Cr-Blink-WebComponents
|
||||||||
| ► Sign in to add a comment | |||||||||