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: Inject pointer-events css into preview modal content #13

Merged
merged 3 commits into from Jun 5, 2023

Conversation

pboivin
Copy link
Owner

@pboivin pboivin commented Jun 2, 2023

closes #12

@pboivin pboivin force-pushed the fix/preview-modal-pointer-events branch from 6ef02cc to 33a32a7 Compare June 5, 2023 00:46
@pboivin pboivin merged commit a66e0d6 into main Jun 5, 2023
4 checks passed
@pboivin pboivin deleted the fix/preview-modal-pointer-events branch June 5, 2023 21:56
return $htmlContent;
}

$style = '<style>body * { pointer-events: none !important; }</style>';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using just body as the selector will do because the property will naturally cascade. body * is unnecessary greedy and could cause performance issues with larger sites

https://stackoverflow.com/questions/2951997/what-is-the-performance-impact-of-the-universal-selector

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I'll run some tests and fix it in the next patch release 👍️

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.

Scrolling Not Allowed By Default
2 participants