Only delete the selection content when selected multiple lines #182

Closed
synw1024 wants to merge 1 commit from master into master
synw1024 commented 2025-05-14 11:18:26 +02:00 (Migrated from github.com)

After reading this issue: https://github.com/ProseMirror/prosemirror/issues/1482. I'm sure the patch 4d2e1ba cause a bug to Sogou(https://shurufa.sogou.com) chinese input. It's partly the result of Sogou itself which doesn't sent "keydown" and "compositionupdate" events(https://github.com/electron/electron/issues/33386). And it's partly the result of the patch deletes the selection when starting a composition.

Bug reshow:
reproduce

Bug fixed:
fixed

After reading this issue: https://github.com/ProseMirror/prosemirror/issues/1482. I'm sure the patch [4d2e1ba](https://github.com/ProseMirror/prosemirror-view/commit/4d2e1ba7545328313127a4ed94860b83e582a943) cause a bug to Sogou(https://shurufa.sogou.com) chinese input. It's partly the result of Sogou itself which doesn't sent "keydown" and "compositionupdate" events(https://github.com/electron/electron/issues/33386). And it's partly the result of the patch deletes the selection when starting a composition. Bug reshow: ![reproduce](https://github.com/user-attachments/assets/0e235b54-594d-4042-8fd5-cc8dd8e64210) Bug fixed: ![fixed](https://github.com/user-attachments/assets/30d54bf6-9cb2-4091-aeca-07b2a49aa7b5)
marijnh commented 2025-05-14 11:31:32 +02:00 (Migrated from github.com)

Good point. I've pushed a slightly different patch (attached), since node object identity isn't something you can rely on, and inline nodes with content exist. Could you verify whether that approach works for you?

Good point. I've pushed a slightly different patch (attached), since node object identity isn't something you can rely on, and inline nodes with content exist. Could you verify whether that approach works for you?
synw1024 commented 2025-05-14 11:46:45 +02:00 (Migrated from github.com)

Good point. I've pushed a slightly different patch (attached), since node object identity isn't something you can rely on, and inline nodes with content exist. Could you verify whether that approach works for you?

It works, I have tested

> Good point. I've pushed a slightly different patch (attached), since node object identity isn't something you can rely on, and inline nodes with content exist. Could you verify whether that approach works for you? It works, I have tested
marijnh commented 2025-05-14 12:32:20 +02:00 (Migrated from github.com)

Great. I've tagged it as 1.39.3

Great. I've tagged it as 1.39.3

Pull request closed

Sign in to join this conversation.
No reviewers
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-view!182
No description provided.