[Bug]: Backspace doesn't work in shadow root on Firefox #6105
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Bug
The issue or pullrequest is related to a bug
Affected Packages
core, pm, react, extension-*
Version(s)
2.11.5
Bug Description
On Firefox, backspace (and delete) does not remove individual characters. Deleting selections works and deleting lines works, but not individual characters. Works fine in Chrome.
Note that this is in the context of a browser extension, where Firefox sometimes works in strange ways, probably due to restrictions/sandboxing. I was unable to repro the issue in the CodeSandbox, despite it being almost exactly like the actual code we're using. The reason for this is likely because it's not running in the context of a browser extension (content script). If you want to see the bug in production, install our extension and open a job application and then click "Generate Letter" in the "Cover Letter" section of the popup on the right.
Also note that it may not actually be due to the shadow root. It may only be because it's running within a browser extension, but we need to use a shadow root to isolate the elements/styles from the rest of the page.
Browser Used
Firefox
Code Example URL
https://codesandbox.io/p/sandbox/ecstatic-thunder-9qmrgv
Expected Behavior
It should remove characters when pressing backspace/delete.
Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: