Need to backspace twice to remove empty paragraph on iOS

I’m getting this in my editor but the same thing happens in the editor in the site in Safari on my iPad (latest iOS version).

Steps: Select all the default content and delete it. Type “Test” Press return on the on-screen keyboard Press backspace. (Result: caps lock/shift turns off but 2nd paragraph remains) Press backspace again (Result: 2nd paragraph removed)

I can try to work around this but it seems like a bug.

I can’t reproduce this on iPhone or iPad with iOS 15.

Interesting. Just noticed i’m on 14.8 (the latest for ios 14) so maybe they did something on their end. Will check it out when I upgrade.

Ok i tried it in ios 15 on my ipad and the same exact thing happens. The 1st backspace turns off the shift and the 2nd removes the empty paragraph

Also note that I do not get that behavior when I just try with a vanilla contentEditable div but I have not stepped through the backspace handling to see where its breaking down.

In case anyone is interested it seems the issue is that since the caps lock is on the inputrule for backspace will not match because e.shiftKey is true and it will look for “Shift-Backspace”. I didn’t delve further to see why it’s changing the shift state but keeping the paragraph but presumably one wants the Backspace associated commands to be invoked so probably need to add a mapping for Shift-Backspace

1 Like

Huh, interesting; I’ve run into a similar issue involving caps-lock but that is with undo and redo with Mod-z and Shift-Mod-z.

Binding shift-backspace seems like a good idea, then. Done in this patch.