Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(android/engine): Refactor updateSelection #11389

Merged
merged 1 commit into from
May 9, 2024

Conversation

darcywong00
Copy link
Contributor

Relates to #11360 and follows #11384 -

Applies suggested refactoring of updateSelection

  • Eliminate selStart, selEnd, and result vars
  • short-circuit checks (to return false)

User Testing

Setup Install PR build of Keyman for Android and enable Keyman as the default system keyboard

  • TEST_INVERTED_SELECTION_RANGE : Using Keyman for Android as a system keyboard, ensure that backwards selection ranges do not crash the keyboard.
  1. Select text (right to left), then drag one of the end points through and past the other one.
  2. If the keyboard immediately disappears, or you see an error notification, FAIL this test.
  • TEST_NORMAL_SELECTION_RANGE: Using Keyman for Android as a system keyboard, ensure that normal (forward) selection ranges do not crash the keyboard
  1. Select text (left to right).
  2. If the keyboard immediately disappears, or you see an error notification, FAIL this test.

@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels May 7, 2024
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented May 7, 2024

User Test Results

Test specification and instructions

  • TEST_INVERTED_SELECTION_RANGE (PASSED): I tested this issue with the attached "Keyman 17.0.320-beta-test-11389" build on an Android 14 environment: Here is my observation. (notes)
  • TEST_NORMAL_SELECTION_RANGE (PASSED): I followed steps 1 to 3 that were mentioned above. The keyboard did not disappear when selecting some text from left to right. When moving the text selection from left to right and right to left, it happens appropriately.

Test Artifacts

@dinakaranr
Copy link

  • TEST_INVERTED_SELECTION_RANGE (PASSED): I tested this issue with the attached "Keyman 17.0.320-beta-test-11389" build on an Android 14 environment: Here is my observation.
  1. Installed the "keyman-17.0.320.apk" file and gave all permissions to the application.
  2. Checked the "Enable Keyman as system-wide keyboard" and set the keyboard as the default keyboard box on the settings page.
  3. Open the Chrome browser, and then enter some text in the address bar and Google search box.
    The keyboard did not disappear when selecting some text from right to left. The keyboard stays on the screen when dragging the text selection from right to left.
  • TEST_NORMAL_SELECTION_RANGE (PASSED): I followed steps 1 to 3 that were mentioned above. The keyboard did not disappear when selecting some text from left to right. When moving the text selection from left to right and right to left, it happens appropriately.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label May 8, 2024
Base automatically changed from fix/android/invalid-selection to beta May 9, 2024 01:43
@darcywong00 darcywong00 merged commit 298437e into beta May 9, 2024
6 checks passed
@darcywong00 darcywong00 deleted the refactor/android/update-selection branch May 9, 2024 01:43
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 17.0.321-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

bug(android): selected-text handling crashes, continued
5 participants