Skip to content

[WASM Skia] Dismissing the mobile soft keyboard also closes open flyouts/popups/overlay panes #25380

Open

Description

@MartinZikmund

Current behavior 🐛

On Skia WebAssembly running in a mobile browser, dismissing the on-screen keyboard also closes any open light-dismiss overlay (flyouts, popups, overlay SplitView/NavigationView panes).

Seen in the SamplesApp (Skia WASM, net11.0-browserwasm, Release) on Android in Edge:

  1. Open the hamburger menu, so the samples pane opens as an overlay.
  2. Tap Search samples. The soft keyboard shows up and the pane stays open (good).
  3. Dismiss the keyboard (keyboard hide button / system back).
  4. ❌ The pane closes together with the keyboard.

The window size doesn't change during any of this. The keyboard only shrinks the visual viewport (window.visualViewport), while the layout viewport/window bounds stay put. So whatever closes the overlay is reacting to something that isn't a real window resize.

(screen recording attached below)

Expected behavior 🎯

Showing or hiding the soft keyboard leaves open flyouts/popups/panes alone. It should only update InputPane.OccludedRect (and bring the focused element into view). Light dismiss should come from an actual outside tap, like on WinUI.

How to reproduce it (as minimally as possible) 🔬

  1. Run any Skia WASM app on a phone (Android Chrome/Edge).
  2. Open a Flyout (or an overlay SplitView pane) that contains a TextBox.
  3. Focus the TextBox, then dismiss the soft keyboard.
  4. The flyout closes.

Workaround 🛠️

None known.

Possible cause 🔍

Not pinned down yet. Candidates worth checking:

  • WebAssemblyWindowWrapper.ts listens to visualViewport resize/scroll (reportKeyboardOcclusion) and pushes InputPane.OccludedRect. Something downstream of the occlusion going back to zero (bring-into-view, XamlRoot.Changed → popup re-placement) may be closing the popup.
  • Hiding the keyboard blurs the hidden #uno-input element. If that blur is read as focus leaving the app or window deactivation, it could trigger light dismiss.
  • Some mobile browsers still fire a window resize on keyboard hide (depends on the browser and the interactive-widget viewport setting). That goes through OnResize → RaiseNativeSizeChanged even though the bounds end up the same as before.

Environment

  • Uno.UI / Uno.Sdk: SamplesApp from the WASM staging build (master, Oct 2026)
  • Target: net11.0-browserwasm (Skia WebAssembly), Release
  • Device: Android phone, Microsoft Edge
  • Platforms affected: WebAssembly (Skia) on mobile browsers; iOS Safari not verified yet

Activity

  1. added
    kind/bug
    platform/wasm 🌐
    triage/untriaged
    area/skia ✏️
    difficulty/tbd
    area/popups 💬
    on Oct 13, 2026
  2. MartinZikmund commented on Oct 13, 2026

    @MartinZikmund
    MemberAuthor

    Found the root cause using instrumented builds on a real device. Fix is in #25387.

    What happens (Edge on Android): while the keyboard is up, Edge hides its bottom toolbar (back / forward / + / tabs / menu) and keeps the page's layout height frozen. When the keyboard is dismissed, by the chevron or by Back, Edge re-lays out the page before it re-attaches the toolbar:

    19754 window.resize doc=411.4x845.3   <- toolbar not back yet (+52.2 CSS px)
    19757 RaiseNativeSizeChanged 411.4,845.3
    19759 PopupRoot.CloseLightDismissablePopups  (XamlRoot.Changed)
    19858 SplitView.SizeChanged 737 -> 789 -> TryCloseLightDismissiblePane
    19894 window.resize doc=411.4x793.1   <- toolbar back, ~140ms later
    

    The input is still focused through all of this. Uno passed the blip on as a real window resize, so the resize-driven light-dismiss rules closed everything. The jump is always exactly the toolbar height (52.2 CSS px ≈ 137 physical px at DPR 2.625).

    iOS Safari 27: the keyboard only changes visualViewport. The layout size never changes, so iOS was never affected.

    Fix: during text entry (#uno-input focused), a change that only affects the height is reported once it has held for 300ms, so a transient blip never reaches XAML. Width changes, rotations, and resizes outside text entry are reported immediately.

    Side note: the guess in the description that the keyboard itself resizes the viewport was wrong. The keyboard only covers the content, and the resize comes from Edge's toolbar.

  3. added
    7.1
    on Oct 14, 2026
  4. removed
    7.1
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/popups 💬area/skia ✏️difficulty/tbdkind/bugplatform/wasm 🌐triage/untriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions