Skip to content

Given_InputPane: OccludedRect_Cleared (iOS) and App_Ensured_Focused_Element (Android) runtime tests fail on Skia CI and are skipped #25227

Open

Description

@MartinZikmund

Current behavior 🐛

Two Given_InputPane runtime tests added by #24947 fail on Skia mobile CI and are currently skipped with a PlatformCondition, so they no longer run on those heads. This issue tracks finding the real cause of each and removing the skips.

  • iOS Skia: When_OccludedRect_Cleared_Then_Content_Restored (skipped via RuntimeTestPlatforms.SkiaIOS)
  • Android Skia: When_App_Ensured_Focused_Element_In_View_Then_Layout_Untouched (skipped via RuntimeTestPlatforms.SkiaAndroid)

Both pass on Skia Desktop (and WASM, where they run). Neither was reproduced locally (no device or simulator available): the failures and causes below come from CI logs and code inspection, so the causes are suspected, not proven.

iOS failure message

Timed out waiting for condition to be met. The TextBox did not return to its position once the keyboard hid (top 1286, was 923).

It also fails when the test is retried alone, so it is not a flake. The gap is about 363 DIPs.

Android failure message

Expected a difference no greater than <0.5> between expected value <318> and actual value <760> ("The layout must be left untouched when the app handled the adjustment.")

The skips were added by #24782 (merged), because both tests were blocking unrelated PRs.

Expected behavior 🎯

Both tests pass on their Skia mobile heads, and the [PlatformCondition(... SkiaIOS)] / [PlatformCondition(... SkiaAndroid)] exclusions are removed.

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

  1. Check out master and remove the two exclusions in src/Uno.UI.RuntimeTests/Windows/UI/ViewManagement/Given_InputPane.cs:
    • the RuntimeTestPlatforms.SkiaIOS flag on When_OccludedRect_Cleared_Then_Content_Restored
    • the RuntimeTestPlatforms.SkiaAndroid flag on When_App_Ensured_Focused_Element_In_View_Then_Layout_Untouched
  2. Run the Skia runtime tests on an iOS simulator and an Android emulator (the Given_InputPane class).
  3. Both tests fail with the messages above.

Workaround 🛠️

None needed for apps (this is test-only so far). The tests are skipped on those heads.

Suspected causes (not verified on a device)

iOS: content does not scroll back. The test fakes the keyboard by setting InputPane.OccludedRect directly, then clears it with new Rect(0, 0, 0, 0). On iOS the real keyboard notifications (OnKeyboardWillShow / OnKeyboardWillChangeFrame / OnKeyboardWillHide in AppleUIKitWindowWrapper) also write _inputPane.OccludedRect, and the focused TextBox may bring up the real keyboard on the simulator. Those writes could race with, or override, the faked rect, leaving the root viewport and the scroll offset not restored. The ~3x scale of the simulator may also matter, since the difference is large (363 DIPs) rather than a rounding error. Worth logging OccludedRect and the ScrollViewer vertical offset across the sequence on a simulator.

Android: baseline captured with the layout already shifted. The "before" top of 318 for a bottom-aligned 40 px TextBox suggests the emulator's real soft keyboard is already showing when the test focuses the TextBox, so the baseline is taken with the layout already moved. After the simulated occlusion the layout settles at 760, the un-shifted position. The test probably needs to suppress or await the real IME before taking the baseline. Alternatively, Android should honour EnsuredFocusedElementInView for the real keyboard too, via ApplicationActivity.OnKeyboardChanged, which sets OccludedRect from the real keyboard size.

Relevant code on master (e98c0dc):

Works on UWP/WinUI?

N/A. The tests are excluded on native WinUI as well (NativeWinUI), since they exercise Uno's own input pane handling.

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

iOS, Android

Uno.SDK version (and other relevant versions) 📦

master at e98c0dc (confirmed by code inspection that both skips are still present); the CI failures were seen on master builds from early October 2026 and on PR builds.

IDE version 🧑‍💻

N/A (CI only)

Anything else we need to know? 💬

Related: #24489 and #24490 track other flaky Given_InputPane tests. The two tests here are different: they fail deterministically on their mobile heads. Relevant PRs: #24947 (added the tests), #24782 (skipped them).

Activity

  1. added
    kind/bug
    platform/android 🤖
    platform/ios 🍎
    triage/untriaged
    area/skia ✏️
    area/tests 🧪
    difficulty/medium 🤔
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/skia ✏️area/tests 🧪difficulty/medium 🤔kind/bugplatform/android 🤖platform/ios 🍎triage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions