Closed christiansteinert closed 1 year ago
For a screen capture of the problem, see: https://user-images.githubusercontent.com/2151502/215888476-b79d7b69-47fe-496c-9e23-619b23d51d8e.mp4
Another manifestation of the same problem (I think) is a bit more hidden. Type, say, "ldig<space>
" which is properly converted. Now you can backspace and fix that to "ldog" and it will be converted fine again. However if you type "ldig<space><space>
" (fat fingers), the second space does nothing (it's added and removed) but now when you backspace to 'i' and change that to 'o' you get "ལྡo".
I have improved the way how space and backspace are handled. This should get of quite a bit of weird behavior when using space and backspace or a combination of both. The above-mentioned cases work correctly for me now on a recent Android device.
There is one case where I could not prevent a problem: With the Google "Gboard" on-screen keyboard for android it is possible to have the keyboard insert a dot if space is pressed twice. If this feature is enabled and space is pressed twice or thrice in rapid succession then sometimes the syllable is cut apart in the middle and a dot followed by a space are inserted into the middle of the syllable. This is impossible to prevent because the keyboard code will generate a backspace and will then force a dot and space to be inserted at the current cursor position which breaks the existinginput.
Apart from that the input handling should now more robust and should be much less likely to produce strange effects when pressing space and backspace on mobile devices.
On mobile devices there is a bug which occurs for certain letter combinations when typing a word and then trying to correct it.
How to reproduce:
Instead of showing "sbyo" in the input field, the input text now gets converted to "སྦoy" and the curser is suddenly between "o" and "y", not anymore at the end of the input.
The problem happens only on mobile devices but happens not only in the mobile app but also when using the online version of the dictionary the mobile versions of Firefox or Chrome running on Android. It is therefore possible that the Android keyboard intereferes somehow.
On desktop while using the web version of the dictionary the problem does not occur, neither with Firefox nor Chrome.