ProseMirror / prosemirror

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

Bug: Prosemirror-view safariShadowSelectionRange - Error after hardbreak when loading editor within shadow root environment in webkit (Safari) #1454

Open aagash-ni opened 3 months ago

aagash-ni commented 3 months ago

I'm encountering an issue while using ProseMirror within the shadow root environment in Safari. It appears there's a malfunction occurring when executing a hard break (Shift + Enter) within the safariShadowSelectionRange method. This is due to the beforeinput method not being emitted, resulting in the found variable becoming undefined.

Actual Result: The cursor vanishes and there is some uncertainty in the selection.

Expected Result: There should be no disruption in the code, and the cursor selection should function as expected.

image

image

Related impact: https://github.com/ueberdosis/tiptap/issues/5026

Without the shadow DOM, it functions as expected.

marijnh commented 3 months ago

Could you check if prosemirror-view 133.4 solves this?