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

Selection doesn't work in Safari 15 with Shadow Dom #5144

Closed
azvoncov-smartling opened this issue Oct 3, 2022 · 2 comments · Fixed by #5648
Closed

Selection doesn't work in Safari 15 with Shadow Dom #5144

azvoncov-smartling opened this issue Oct 3, 2022 · 2 comments · Fixed by #5648

Comments

@azvoncov-smartling
Copy link

Description
Bug is similar to this #3749
But the fix does not work in the latest version of Safari

Recording
85566257-2e518000-b630-11ea-9b45-194ec4caeb67

Sandbox
https://codesandbox.io/s/slate-reproductions-forked-wzjois

For some reason sandbox doesn't want to register the webcomponent, but you can run this code locally

Steps
To reproduce the behavior:

  1. Run Slate inside Shadow Root in Safari
  2. Try to type something
  3. The caret jumps to the beginning

Expectation
Same behavior as in Chrome

Environment

  • Slate Version: any
  • Operating System: mac
  • Browser: Safari

Context
I think we can use these developments to repeat the work of getSelection
https://github.com/ProseMirror/prosemirror-view/pull/142/files

@AlekseyManetov
Copy link

AlekseyManetov commented Mar 6, 2024

@dylans can anyone look on this issue please? Currently it's impossible to use editor with shadow dom in Safari and FF browser. It looks like critical issue for such setup.

@dylans
Copy link
Collaborator

dylans commented Mar 14, 2024

@AlekseyManetov I personally haven't had time for this one, but I want to support getting it fixed.

The most logical first step if possible would be to write failing tests cases so we can track this down more easily and hopefully not regress in the future. I realistically won't have time to address this on my own without failing test cases.

There are a few people who have been making good contributions to Plate under a bounty program, so that might be something to consider. Or I'm happy to review PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants