Skip to content

Android: TextBox runtime tests fail on every master build (IME echo flips backward selection; touch-lock tests wait for a keyboard that never shows) #26010

Closed

Description

@MartinZikmund

Current behavior 🐛

Two groups of Given_TextBox runtime tests fail on the Skia Android lanes (Skia, WebGPU, NativeAOT) of every master build, and so on almost every PR. They fail all 3 retries, and "Rerun failed jobs" doesn't clear them. Latest example: master build 243427.

  1. When_Keyboard_Selection_Backwards_ScrollViewer_Offset, failing since at least 2026-10-28:
    Assert.AreEqual failed. Expected:<0>. Actual:<251> (HorizontalOffset).
    After Shift+Home the selection is backward, and the caret is at index 0. The Android input connection then reports the selection back to the TextBox as a normalized range (TextInputConnection.EndBatchEdit → IImeSessionHost.UpdateTextFromNative). TextBoxCore re-applies it with Select(start, length), which makes the selection forward. That moves the caret to the far end and scrolls the TextBox there. This is a product bug: a real user's backward selection on Android gets flipped too. RichEditBox.SelectFromNative already ignores these echoes.

  2. When_Touch_Tap_Does_Not_Lock_ScrollViewer_Android, When_Touch_Selection_Flick_Does_Not_Lock_ScrollViewer_Android (and sometimes the other *_Does_Not_Lock_ScrollViewer_* tests), failing since master build 242458 (2026-10-30):
    Timed out waiting for condition to be met. The requested input pane must be visible before testing scrolling away from the caret.
    The test helper calls InputPane.TryShow(), which returns true, then requires the pane to become visible. On the CI emulator it never does.

Expected behavior 🎯

  • An IME echo of the current selection range doesn't change the selection's direction.
  • The touch-lock tests don't fail when the emulator never displays a soft keyboard.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. On Skia Android, focus a single-line TextBox that is narrower than its text, and type past its width.
  2. Press Shift+Home, then Shift+Right a few times with a hardware keyboard.
  3. The TextBox scrolls to the end of the text, because the caret has jumped to the far end of the selection.

Test-level: run Given_TextBox.When_Keyboard_Selection_Backwards_ScrollViewer_Offset on Skia Android.

Workaround 🛠️

None.

Affected platforms 📱💻🖥️

Android

Uno.Sdk version (and other relevant versions) 📦

master (7.0 dev), 92e5dff

IDE version 🧑‍💻

N/A

Anything else we need to know? 💬

ScrollPresenterTests.OffsetsChangeWithCustomDuration on Linux Framebuffer was the other failure on every master build. #25382 already fixed it, and PRs based on a master before that only need a rebase.

Activity

  1. self-assigned this
    on Nov 4, 2026
  2. added
    kind/bug
    triage/untriaged
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugtriage/untriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions