-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble in latest Canary reading styles in attached handler of imported element #493
Comments
I can confirm this. I'm going to investigate a bit and probably file a On Wed, May 7, 2014 at 9:49 AM, Jan Miksovsky [email protected]:
|
@sorvell Gracias. |
crbug.com/371026 On Wed, May 7, 2014 at 11:01 AM, Jan Miksovsky [email protected]:
|
@JanMiksovsky Here's an example of importing using CodePen. http://codepen.io/robdodson/pen/BpFAn I've never tried with jsbin but I think someone did pull it off once on polymer-dev |
Closed in favor of https://code.google.com/p/chromium/issues/detail?id=371026 |
Something recently broke in either Canary or Polymer/platform.js that changes what style information is available in an attached handler.
See http://jsbin.com/kaseye/5/edit. This jsbin defines an element whose attached handler reads some style information off an element in its shadow tree. The code works when run as is, and the console will report something like "2px" as the padding on the textarea.
However, if the definition for test-element is moved to a separate file and referenced via an import, the console will now report "0px" as the textarea padding. It seems that getComputedStyle returns a different value in the attached handler depending on whether the element is imported or not.
I have an element (http://component.kitchen/components/basic-autosize-textarea) that relies on this behavior. As the in-place demo on that page shows, the element works fine in production Chrome, but not in Canary (e.g., 36.0.1978.0).
(BTW, to help report bugs like these, I've tried various ways of having a jsbin import an element defined in another jsbin, but run into CORS issues. If anyone can offer guidance on how to do that, I'd be happy to create a parallel repro case that shows how importing the element from a separate file causes the code to break.)
The text was updated successfully, but these errors were encountered: