PolymerElements / paper-icon-button

A Material Design icon button
https://www.webcomponents.org/element/PolymerElements/paper-icon-button
42 stars 44 forks source link

paper-icon-button appended to body instead of head #145

Open evancaldwell opened 6 years ago

evancaldwell commented 6 years ago

Description

paper-icon-button is appended to the body instead of the head so if your body tag isn't on the page yet it blows up.

Expected outcome

The page renders properly with a paper-icon-button on it.

Actual outcome

paper-icon-button can't append to the body so you just get a blank page with errors in the console.

Steps to reproduce

  1. Put a paper-icon-button element in the page.
  2. Do some other work in the head that delays the body from loading.
  3. Check the console.

Browsers Affected

dejan9393 commented 6 years ago

Added pull request here https://github.com/PolymerElements/paper-icon-button/pull/146

chaddelorean commented 6 years ago

Could we get a release quickly once the PR is approved? This is a blocking issue for us as it prevents the rest of our polymer components from loading because of the javascript error.

bicknellr commented 6 years ago

See this comment for more info. tl;dr: Pushing this to after 3.0 stable. In the mean time, you can add the defer attribute to your script to get the same timing as modules which should fix this for you.