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

The card uses non-unique ids for CSS elements inside a card #55

Open
ildar170975 opened this issue Nov 16, 2022 · 1 comment
Open

The card uses non-unique ids for CSS elements inside a card #55

ildar170975 opened this issue Nov 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@ildar170975
Copy link

ildar170975 commented Nov 16, 2022

Checklist:

  • [ x] I updated to the latest version available
  • [ x] I cleared the cache of my browser

Release with the issue:
0.6.3

Last working release (if known):

Browser and Operating System:
Chrome, Win10x64

Description of problem:
The card uses a declutter-child value as an ID for css elements.
Here is an example for custom:mini-graph-card:
image

As a result - css elements do not have unique IDs in case of presence of several cards on the view.
This becomes a problem when using a card-mod in Safari - using pointers like rect#some_id affects on all similar cards on the view instead of only one particular card.
See a more detailed description: kalkih/mini-graph-card#839

Javascript errors shown in the web inspector (if applicable):
None


Additional information:

@ildar170975 ildar170975 added the bug Something isn't working label Nov 16, 2022
@ildar170975 ildar170975 changed the title The card uses non-unique ids for a card The card uses non-unique ids for CSS elements inside a card Nov 16, 2022
@jlsjonas
Copy link

decluttering-card actually seems to be overriding the card's id (which is supposed to be unique across the window) here https://github.com/custom-cards/decluttering-card/blob/master/src/decluttering-card.ts#L128
Causing the unintented side-effects down the line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants