Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add replaceChromeGridTemplateAreas utility function to fix grid-template-area styles that are improperly improperly parsed by Chrome into rule.cssText and causing broken recordings when attempting to play back.
Approach: rather than using regex to parse and manipulate the cssText directly (see original PR), we can check for when the cssText contains the grid issue and rebuild by iterating through
rule.style: CSSStyleDeclaration
collection and creating the string directly from the style declarations.Link to chrome bug: https://issues.chromium.org/issues/40227336
Verified in Firefox and Safari that the issue does not exist. It doesn't try to convert to
grid-template
shorthandExamples:
example declared styles 1:
example declared styles 2:
rule.cssText
for above declared style examples:fortunately, values in
rule.style
collection of CSSStyleDeclaration are correct, so we can use these to rebuild: