Skip to content

fix(inputpane): Restore the root when the keyboard hides without content - #26691

Open
ramezgerges wants to merge 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/inputpane-hide-without-content
Open

ramezgerges wants to merge 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/inputpane-hide-without-content

Conversation

@ramezgerges

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #26579

PR Type:

🐞 Bugfix

What changed? 🚀

InputPane found the root to adjust through Window.InitialWindow.Content.XamlRoot. That is null while the window content is swapped or cleared. A keyboard hide landing in that window skipped the reset of the root viewport, so the area above the keyboard stayed recorded. The next bring-into-view then panned the whole root up against it, with the keyboard already hidden.

On CI this showed up as RadioButtonsInteractionTests.BasicKeyboardTest failing intermittently on Android: a [RequiresFullWindow] test swapped the window content while the keyboard hid, and BasicKeyboardTest later ran with the root panned 10 px up, so its injected taps landed on the next item. The same stale state left the root 296 px up after When_Tab_BringIntoView on the Android Skia lane. An app that replaces its root page while the keyboard closes hits the same bug.

The root is now resolved from the window's own root element, which stays in place while the content changes.

Tests

  • New Given_InputPane.When_OccludedRect_Cleared_Without_Window_Content_Then_Next_Content_Not_Moved: shows the keyboard, clears the window content, hides the keyboard, then loads a page and brings an element into view.
  • Skia desktop runtime: without the fix the new test fails (the page is left 364 px up); with it, all 20 Given_InputPane tests pass.
  • Android CI, on a diagnostics run of this fix (test: Instrument RadioButtons BasicKeyboardTest for Android WebGPU (do not merge) #26674): a probe after every test found the root offset in none of the 10 Android shards (Skia and WebGPU), where the runs before it had offsets of 10 to 296 px.

PR Checklist ✅

🤖 Generated with Claude Code

The input pane resolved the root through Window.Content, whose XamlRoot is
null while the content is swapped or cleared. A keyboard hide landing then
skipped the reset, so a later bring-into-view panned the root against the
stale viewport even though the keyboard was gone.

Fixes unoplatform#26579

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mergify

mergify Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 248785 found UI Test snapshots differences: skia-linux-screenshots: 246, skia-windows-screenshots: 238

Details
  • skia-linux-screenshots: 246 changed over 2504

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_Showcase.png-dark
    • AppWindowTitleBar Properties.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • AutomationProperties_StructureAndProps.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • ClipboardTests.png-dark
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • AnimatedBackVisualSourceSamplePage.png
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png
    • AutomationProperties_StructureAndProps.png-dark
    • Basics.png-dark
    • Basics.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png
    • Buttons.png-dark
    • Buttons.png
  • skia-windows-screenshots: 238 changed over 2504

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppWindowTitleBar Properties.png-dark
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • AnimatedBackVisualSourceSamplePage.png
    • AnimatedVisualsTestbedPage.png
    • AppWindowTitleBar Properties.png
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • Buttons.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Accessibility_Showcase.png-dark

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky RadioButtons interaction tests on Skia iOS and macOS

4 participants