Bug: Safari visual selection bug with custom nodes #1462

Open
opened 2024-05-09 20:24:19 +02:00 by HalfdanJ · 0 comments
HalfdanJ commented 2024-05-09 20:24:19 +02:00 (Migrated from github.com)

When working with custom nodes, there is a bug in safari where too much text is shown as selected. It happens when a selection range starts at a custom node, when that happens the selection is shown as expanded to the beginning of the paragraph.

Steps to reproduce

  • Open the dino examples
  • Make a selection of the text that spans one of the dinos
  • Observe that more text then whats actually is selected is highlighted.

Safari version: 17.4.1

This works fine in chrome.

https://github.com/ProseMirror/prosemirror/assets/227529/e41958b7-ffc7-40c8-bd34-1bcb7be49ce2

Note that even though the selection is shown as starting at the beginning of the paragraph, its not actually selected.

I've noticed that this bug is also visible in apps in production, for example Linear:

https://github.com/ProseMirror/prosemirror/assets/227529/88e5a49f-8e18-4407-a240-376afa032f9f

Maybe related to https://github.com/ProseMirror/prosemirror/issues/1165 ?

When working with custom nodes, there is a bug in safari where too much text is shown as selected. It happens when a selection range starts at a custom node, when that happens the selection is shown as expanded to the beginning of the paragraph. ## Steps to reproduce - Open the [dino examples](https://prosemirror.net/examples/dino/) - Make a selection of the text that spans one of the dinos - Observe that more text then whats actually is selected is highlighted. Safari version: 17.4.1 This works fine in chrome. https://github.com/ProseMirror/prosemirror/assets/227529/e41958b7-ffc7-40c8-bd34-1bcb7be49ce2 Note that even though the selection is shown as starting at the beginning of the paragraph, its not actually selected. I've noticed that this bug is also visible in apps in production, for example Linear: https://github.com/ProseMirror/prosemirror/assets/227529/88e5a49f-8e18-4407-a240-376afa032f9f Maybe related to https://github.com/ProseMirror/prosemirror/issues/1165 ?
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror#1462
No description provided.