Skip to content

Extra text deleted when selecting and replacing text on Android Chrome with Samsung keyboard #1509

@ght901

Description

@ght901

On Chrome (and the other Chromium browsers I've tried) on Android, when using the Samsung keyboard, if you select a section of text and hit a character on the keyboard to replace the selected text, it will delete both the selected text as well as a number of characters in the paragraph after the selection based on the length of the selection. If the full text was Like this one! and you selected Like then typed "A", the resulting text would be As one!

This only happens if the "Predictive text" setting is enabled within the Samsung keyboard settings. I've not been able to reproduce the issue on Firefox or on Chrome with any other keyboard I've tried.

I first noticed this when upgrading the prosemirror-view version I'm using from 1.31.3 to 1.37.1 but it also happens in 1.38.0. After testing a number of versions between those two and believe it was introduced in 1.33.11. I can reproduce it there but not in 1.33.10.

I was able to reproduce it on the prosemirror.net demo. In my testing the position in the document didn't have any effect, other than if the selection ends near the end of the paragraph there's obviously less characters to remove. Not much to see, but here's a recording of it happening.

Screen_Recording_20250214_174555_Chrome.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions