paper-icon-button icon indicating copy to clipboard operation
paper-icon-button copied to clipboard

paper-icon-button appended to body instead of head

Open evancaldwell opened this issue 7 years ago • 3 comments

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

  • [x] Chrome
  • [x] Firefox
  • [x] Safari 9
  • [x] Safari 8
  • [x] Safari 7
  • [x] Edge
  • [x] IE 11

evancaldwell avatar Aug 27 '18 20:08 evancaldwell

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

dejan9393 avatar Aug 27 '18 23:08 dejan9393

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.

chaddelorean avatar Aug 28 '18 22:08 chaddelorean

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.

bicknellr avatar Aug 30 '18 21:08 bicknellr