ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.66k stars 336 forks source link

Safari/Chrome selection issue inside shadow dom #1449

Open tamirgold95 opened 7 months ago

tamirgold95 commented 7 months ago

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

  1. 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

maybe it's related to the dependencies of prosemirror-state , it uses some old version of prosemirror-view (1.27.0), i think that an version update will solve this. some discussion regarding wired behavior of selection in safari where discussed before

https://github.com/ProseMirror/prosemirror-view/commit/64a96e51be902fdcd96d210cf0241293750b16f1

marijnh commented 6 months ago

prosemirror-view 1.33.4 might help with this. Could you give it a try?

peka2 commented 5 months ago

I tested with 1.33.4 and it still occurs.