-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
BUG: Propagating component defaults can break layers when child comments are introduced #5720
Closed
2 tasks done
Comments
Good catch @bernesto |
This was referenced May 24, 2024
This was referenced Aug 27, 2024
This was referenced Sep 20, 2024
This was referenced Oct 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GrapesJS version
What browser are you using?
Chrome v122
Reproducible demo link
https://jsfiddle.net/n38vbktg/
Describe the bug
How to reproduce the bug?
What is the expected behavior?
The comment either remains hidden, or does not cause an error.
What is the current behavior?
The editor treats the comment as an HTMLElement. This triggers several errors when the editor tries to read non-existent properties from the node, such as getComputedStyle or getClientRects. Both methods should perform a check first. Or - a new type should be introduced for comments that overrides the defaults propagated from the parent.
Errors occur here:
grapesjs/src/commands/view/ShowOffset.ts
Line 39 in ac554a3
and here:
grapesjs/src/utils/dom.ts
Line 40 in ac554a3
Code of Conduct
The text was updated successfully, but these errors were encountered: