-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: style element corner case #1417
base: master
Are you sure you want to change the base?
Conversation
style element's rules can be changed both by textContent and sheet API duplicate textContent can cause make dynamic rule mutation invalid
🦋 Changeset detectedLatest commit: 4272390 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I think I need a little more explanation or a test case to review this properly |
@@ -1558,20 +1558,33 @@ export class Replayer { | |||
if ( | |||
parentSn && | |||
parentSn.type === NodeType.Element && | |||
parentSn.tagName === 'textarea' && | |||
mutation.node.type === NodeType.Text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by the removal of the tagName check here as this is supposed to be for legacy support.
shouldn't the check be changed to
(parentSn.tagName === 'textarea' || parentSn.tagName === 'style')
?
I'm working on similar stuff and am working on a test case See #1437 |
The new integration test in #1437 doesn't do much as-is as it passes both before and after the changesets in this PR, but maybe we could use it to demonstrate the problem you are fixing in this PR... see comment |
style element's rules can be changed both by textContent and sheet API duplicate textContent can cause make dynamic rule mutation invalid