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

ID's of iron-icons break other functions that use the same ID in Polymer 3 #92

Open
1 of 8 tasks
NickdeK opened this issue Sep 3, 2018 · 0 comments
Open
1 of 8 tasks

Comments

@NickdeK
Copy link

NickdeK commented Sep 3, 2018

Description

The iron-icons element prevents functions from other elements on the page with the same id from working.

Expected outcome

iron-icons to be scoped inside it's own component and not being put into the lightdom where it can be accessed by other functions/elements that use a querySelector.

Actual outcome

When using iron-icons@3.0-preview (to be used with Polymer 3) the icons get placed in the head with the <g id="search">...</g> directly in the dom. Any other elements or non-webcomponents functions that use the same id for a querySelector will get the iron-icon instead.

Live Demo

Can't create a demo right now (no online editor seems to support Polymer 3?)

Steps to reproduce

  1. Put a iron-icon element in the page.
  2. Put a other non-polymer element in the page that uses a querySelector that matches the id of a the iron-icon icon used
  3. The non-polymer element querySelector returns the iron-icon g element with the matching ID

Browsers Affected

Have not checked all browsers, but is effecting Chrome at least (and probably all other browsers).

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant