Skip to content
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

Polymer unresolved to prevent FOUC doesn't work when a second attribute exists #20826

Closed
DartBot opened this issue Sep 5, 2014 · 7 comments
Closed
Assignees
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.

Comments

@DartBot
Copy link

DartBot commented Sep 5, 2014

This issue was originally filed by dave...@gmail.com


What steps will reproduce the problem?

  1. In your Polymer app's body, set "unresolved" to prevent FOUC.
  2. Also add a second attribute, touch-action="auto".
  3. BUILD and run your app in Chrome, and note FOUC exists.
  4. Remove the second attribute and note FOUC gone.

What version of the product are you using?

SDK 1.6, Polymer 0.13.

Please provide any additional information below.

@sigmundch
Copy link
Member

mmm - I can totally see it if I open your site, but I haven't yet got to do a local repro. If I refresh the site, I don't see it though.

Do you see this also before compiling the app? Only in JS or in Dartium too?

I'm not sure if this is in our side or comes all the way from the polymer.js side of things.


Added Pkg-Polymer, Area-Pkg, Triaged labels.

@sigmundch
Copy link
Member

Aha, we just figured out what is the issue. Turns out that the second attribute is not really causing this. The problem was that our build is moving the platform.js script tag to the <body>

so initially <body unresolved> is there, but the style to make unresolved invisible is not there yet. Platform.js appends a style tag to HEAD to make that work. That logic relies on the fact that platform.js was loaded in <HEAD>.

We need to fix this in our compiler. The best workaround for now is to edit the generated code and move platform.js and dart_support.js to the <HEAD> of the generated .html.


Removed Priority-Unassigned label.
Added Priority-Medium, PolymerMilestone-Next labels.

@jakemac53
Copy link
Contributor

Set owner to @jakemac53.
Added Started label.

@jakemac53
Copy link
Contributor

Going with the slightly more general approach of not moving anything into the body until we find the first import.

@jakemac53
Copy link
Contributor

Fixed in r40511


Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Sep 19, 2014

This comment was originally written by davenot...@gmail.com


Rad! Doing a "vi build/web/index.html" to move dart_support.js into head every time I build for production is no fun. :) I'll have to wait for it to hit stable, though.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/polymer-dart#289.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.
Projects
None yet
Development

No branches or pull requests

3 participants