iOS and Android - Undesirable behaviour with selected text

Using Keyman 15.0.272 on iOS and Android (and also a KAB keyboard) I’ve had users report and I’ve reproduced some undesirable behaviours around selected words.

On iOS (my iPhone 7 is 15.5):
If I double tap to select a word not at the start of a line then type backspace or something else to replace it, then the space before that selected word is removed too. Other keyboards don’t remove the space. The extra removal of the space occurs in my NaijaType keyboard and EuroLatin keyboards in Keyman.

On Android
I must say my phone doesn’t respond well to trying to select words, but when it does recognise that’s what I’m trying to do Keyman doesn’t remove the space like on iOS, but switches to the capitalised layer automatically which is not what I usually want, and then when I tap shift to change layer it deletes the selected text as if I pressed the delete key. Since I was likely to remove it anyway this is more disconcertingly unexpected behaviour than a catastrophe, but I would prefer it if pressing the layer change buttons didn’t remove selected text and also the non-shift layer is more likely to be the one I want. A clever algorithm would maybe try to guess what I want by looking at context before the selection if possible, but I don’t really expect that. The behaviour is quite different on iOS and Android, anyway.

I would like to find out whether this is very common, whether I can fix my keyboards to cope with it and whether this is something developers are aware of and whether any attention can be given to it.

Actually I’ve noticed that my Tchad Keyman keyboard, which has been around quite a while, sometimes has this kind of unexpected behavior on Windows 11 (but I believe also on Windows 10 as well) when I have some text selected and I press backspace. It deletes the selected text, but also the previous character. I have seen this behavior for quite some time, maybe a year, but I don’t remember it happening before that. So I think it must have happened with some Keyman version change.

So I can demonstrate the behavior right now in Word 2019. With my keyboard activated, type “A test”, select “test” and type backspace, and the space is deleted as well. It doesn’t do this in LibreOffice Writer. I can also demonstrate it while I’m typing this post. I typed “A test”, selected “test” and typed backspace, and I’m left only with “A” and no space.

As OP mentioned, not a huge problem, but somewhat annoying.

I’ve noticed this several times on my own end.

Reading your post, I’m pretty sure I know what the cause is re: the deleted space, but it may take us a bit to discern the best way forward on it. It’s an architectural issues due to how the mobile platforms are structured internally. If I’m right about the cause, this behavior should be extremely consistent on Android and on iOS.

The bit on Android… I’d have to look a bit more into, or perhaps ask a colleague to do so; I’d expect it to have the same effect as on iOS. @darcy, any ideas?

Either way, definitely a bug, and we’ll get on that. Please bear with us for a bit, as we’re focused on planning this week and may not be able to address it immediately.

This would be great to turn into an issue on our main repository; I’ll aim to do so later today when I have the space for it, unless someone else beats me to it first.

For the iOS issue: bug(iOS): selecting text and then backspacing also deletes the character before the selection · Issue #7865 · keymanapp/keyman · GitHub

For Android: bug(android): · Issue #7866 · keymanapp/keyman · GitHub (though it probably needs some cleanup.)

Yes, this is not great. It sounds like we have an issue with text selection and deletion with TSF-aware apps.

We’ll treat this as a regression, most likely in Keyman 15, but will try and narrow that down.

For all three of these platforms, fixing these kinds of inconsistencies is high on our priority list because they are continual irritations in use.

I’ve documented the Windows bug at bug(windows): backspace with selected text deletes an extra character in TSF only · Issue #7870 · keymanapp/keyman · GitHub

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.

Just re-opening this topic to let you know that we’ve finally fixed this bug in 17.0.298 beta (fix(web): prevent layer switch key from erasing selection by mcdurdin · Pull Request #11032 · keymanapp/keyman · GitHub)!

2 Likes

Wow! That’s great. I’ve got used to the behaviour but still find it annoying so will be very happy when it’s possible to use selection with keyman keyboards safely. Will this affect all platforms? Android, iOS, web, windows, Mac etc?

My current experience with my Naija Type keyboard on Mac Keyman 16.0.141 in Chrome is that typing backspace with any selection is somewhat catastrophic. (Actually as I type this, I notice that backspace almost always deletes much more than I intend, but it’s perfectly usable on Windows and most apps on Mac.)

1 Like

This particular fix is specific to iOS and Android. If you have other concerns with Keyman for Mac, probably best to discuss them as a separate topic. Note that we have a done lot of work on Keyman for Mac in the 17.0 cycle, so I am hopeful that the issues you have been encountering will be resolved in 17.0!

1 Like