I’ve encountered a problem related to Backspace behavior on Android mobile devices when using any on-screen keyboard. When deleting at the start of a line (where a paragraph should normally merge with the one above), instead of merging lines, it inserts new empty lines. This issue does not occur on desktop browsers, macOS, or iOS devices — it seems specific to Android.
After some testing, we found that the issue is caused by the baseKeymap provided by prosemirror-commands. Once we removed baseKeymap from our editor’s setup, the issue went away entirely. To confirm this further, we tried the same behavior on the “Dinos in the document” example from the official ProseMirror site, and observed similar results — lines were not merged on Backspace.
Is this something we’re supposed to fix on our side? Or is it a known limitation on Android related to input handling that could be addressed upstream?
Any guidance or insight would be greatly appreciated!
Backspacing to join paragraphs works fine for me on Chrome with GBoard, HeliBoard, and stock Android keyboard. What browser are you testing with, and are there any browser extensions or keyboard settings active that might be affecting this for you?
We’ve double-checked, and indeed — not all Android keyboards trigger this issue. So far, we’ve only reproduced the problem on SwiftKey and Yandex Keyboard, across multiple Android devices, using a clean Chrome browser without any custom keyboard settings.
We also tested with Gboard and Samsung Keyboard, and everything works as expected there — the issue does not appear.
Additionally, we reproduced this behavior on the basic example page, which confirms that it’s not specific to our editor setup.
Do you have any recommendations on how to work around this for keyboards like SwiftKey and Yandex Keyboard? As far as I remember, this issue didn’t exist before.
We’re currently using prosemirror-commands version 1.7.0.
Thanks again for your engagement — I really appreciate your involvement in helping us investigate this issue.
We ran several additional tests and found that the merging/backspace bug doesn’t occur consistently, and we weren’t able to identify any clear pattern or specific conditions that cause it.
What we can say for sure is that the issue doesn’t appear on the ProseMirror home page, but it can be reproduced on example pages like “Basic” and “Dinos in the document”. Even on those example pages, though, the bug appears sporadically and is difficult to reproduce reliably.
We also checked whether the bug is related to updates in prosemirror-commands, and it seems it’s not version-related. We downgraded to version 1.6.2, and the bug still appeared.
I’m attaching a screen recording showing the issue occurring directly on the ProseMirror example pages. The test was performed using Android with SwiftKey, in the Chrome browser, without any extensions or custom keyboard settings.
Indeed, the issue only seems to appear when the paragraph that the cursor starts in has image DOM nodes in it. But there I could reliably reproduce it. This patch should help.