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

Remove innerHTML injection from table selection #3804

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

thegreatercurve
Copy link
Contributor

@thegreatercurve thegreatercurve commented Feb 1, 2023

This doesn't break any core selection functionality. It just moves the logic for reseting the default browser selection styles into the custom stylesheet.

This is because injecting it into the DOM via innerHTML causes a CSP rule issue as detailed in the below issue.

What is looks like without the resets applied:

image

With the reset applied:

image

Closes #3477

@vercel
Copy link

vercel bot commented Feb 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
lexical ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 1, 2023 at 10:23AM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 1, 2023 at 10:23AM (UTC)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 1, 2023
@github-actions
Copy link

github-actions bot commented Feb 1, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 25.33 KB (0%) 507 ms (0%) 76 ms (+37.33% 🔺) 583 ms
packages/lexical-rich-text/dist/LexicalRichText.js 39.26 KB (0%) 786 ms (0%) 69 ms (+6.71% 🔺) 855 ms
packages/lexical-plain-text/dist/LexicalPlainText.js 39.23 KB (0%) 785 ms (0%) 66 ms (-16.62% 🔽) 851 ms

@thegreatercurve thegreatercurve merged commit 9b12548 into main Feb 1, 2023
@trueadm trueadm mentioned this pull request Feb 3, 2023
@fantactuka fantactuka deleted the bug/csp-table-selection branch July 6, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: LexicalTableSelection.ts breaks CSP rules due to style in innerHTML
3 participants