ubports / ubuntu-touch

Ubuntu Touch's issue inbox is now migrated to GitLab.
https://gitlab.com/ubports/ubuntu-touch
1.29k stars 109 forks source link

Keyboard: Spell checking and word suggestion prevents selection of last word typed and breaks formatting #2116

Open TriVoxel opened 1 year ago

TriVoxel commented 1 year ago

Steps to reproduce

Enable word suggestions and/or spell checking in keyboard settings. Type into any text field such as a text message, an app like Notes, Teleports... Type a word or two, press space, type another word but don't press space or period so that the word is underlined. Select all or manually select text and try to copy, cut, paste, undo, etc.

Expected behavior

Be able to select all the text, including last word typed. Likely, when a selection of any kind is made, this underlined text should be committed into normal text before the selection occurs.

Actual behavior

The text is not selected which can lead to more problems. It is treated as though it is not normal text like everything else. All text except this last word will be selected, but oddly the last selection marker will appear after this underlined word. If in this underlined state, you cannot select the text with the select all button, or by manually selecting it. This means you cannot perform any operations on this text such as copy, overwriting with paste, deleting, undo/redo, etc.

Additionally, if you enter this state of incorrectly selecting the underlined text and you click off to deselect, it will erase all text you had selected except the underlined text. From here, undo is somewhat broken. This creates a lot of problems in an app like Notes, but really in any text box, too.

kugiigi commented 1 year ago

This might be related and can be fixed with this https://gitlab.com/ubports/development/core/lomiri-keyboard/-/merge_requests/199

TriVoxel commented 1 year ago

Seems like it. Good find.