tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

[Bug]: Safari/Chrome selection issue inside shadow dom

Open tamirgold95 opened this issue 6 months ago • 2 comments

Which packages did you experience the bug in?

@tiptap/pm

What Tiptap version are you using?

2.2.4

What’s the bug you are facing?

I have an issue while using tiptap on Safari/Chrome inside Shadow Dom using IOS while typing in Japanese (and other similar languages like Chinese, Korean, and Thai).

When typing using Japanese characters, the entire comment is constantly selected which can cause some problems.

Steps to reproduce:

  1. On Safari IOS try to type in Japanese.
  2. If you select a predictive text and then continue typing, it will remove all your text. OR
  3. When clicking the “Return” button instead of just adding a new line it will replace the current text.

Expected result: the text shouldn't be selected.

Actual result: comment text is selected on IOS.

Platform : Safari IOS

What browser are you using?

Safari

Code example

https://codesandbox.io/p/sandbox/aged-platform-ssf6ks?file=%2Fsrc%2FApp.js

What did you expect to happen?

Expected result: the text shouldn't be selected.

Anything to add? (optional)

No response

Did you update your dependencies?

  • [X] Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • [ ] Yes, I’m a sponsor. 💖

tamirgold95 avatar Feb 25 '24 10:02 tamirgold95

+1 on this. Thanks for reporting @tamirgold95

gwidonw avatar Mar 21 '24 09:03 gwidonw

I'm facing the same issue with tiptap-vue2 and Web Components where Japanese input on iPhone gets automatically selected. Has anyone found a workaround?

related to https://github.com/ProseMirror/prosemirror/issues/1455

peka2 avatar Apr 05 '24 18:04 peka2