-
Notifications
You must be signed in to change notification settings - Fork 25
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
Widgets are inserted into the user's content when body.isContentEditable
#8094
Comments
Thoughts
Provisional resolutions
Also
|
The toast is not in a shadow dom. We don't have this problem with the Snippet Shortcut Menu, and it's in a |
Indeed it looks like the shadow dom already does not inherit contenteditable, so this specific issue does not apply. However the content is still accessible and editable by the host website's JavaScript
It does what it says on the tin, and it says isolation is good for safety and reliability. Content scripts are specifically run in an isolated context to avoid conflicts and increase security, this continues on that line.
I mentioned this before, all we need is something like Anyway for this issue the |
Given that this case arises with certain editors, IMO the correct long-term fix is to render the elements on the on the parent frame (which IIRC is what Grammarly does). To solve/prevent the immediate problem of data corruption in editors, I would recommend the following immediate approach for Show in top-level frame:
Throw an error (mod developer should just have these run in the top-level frame):
Ensure PixieBrix always cleans up the container:
Editors Impacted (in playground, we should include runtime tests):
|
Moving to "Next" - I'm also having trouble reproducing on the Salesforce edit field right now: https://pixiebrix3-dev-ed.lightning.force.com/lightning/r/Case/5008X00002YDcUtQAL/view. But I'm not aware of what would have changed |
@twschiller I think we should close this issue unless you see a reason otherwise, given the above change |
Thanks for clarifying - will close and we can reopen as necessary |
Describe the bug
Our widgets will be injected into this page and, if the content editable field/frame is read by a controller (as one would expect), it will include our widgets
To Reproduce
Actual behavior
contenteditable
field, in the DOM, and are potentially saved as part of the user inputExpected behavior
I'm not sure of how to deal with this. At at very least we can add a
contenteditable=false
attribute to all of our widgets (part of #7670)Demo
Screen.Recording.3.mov
Context
Seen in https://github.com/pixiebrix/pixiebrix-source/issues/322
The text was updated successfully, but these errors were encountered: