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

fix: remove style node when attached to parent node in a shadow root #2558

Merged

Conversation

confususs
Copy link
Contributor

Description

This is a fix for web components that use the shadow dom.

Basically, whenever a stylesheet is removed, document.querySelector() is used, and this doesn't work when gridstack is used within a shadow root.

To fix this, we can make use of the styleLocation, which describes whether we're attaching the styles in a parent node or the head of a document

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test) < I can't get tests working on master either 🙈
  • Extended the README / documentation, if necessary

@adumesny adumesny merged commit 753dd38 into gridstack:master Dec 4, 2023
@adumesny
Copy link
Member

adumesny commented Dec 4, 2023

thank you.

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

Successfully merging this pull request may close these issues.

2 participants