Skip to content

mobile: the keyboard stays up while a field is edited; panels show on phones; Fullscreen clears the UI button - #1497

Merged
transfix merged 1 commit into
masterfrom
fix/mobile-ui
Nov 23, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/mobile-ui

Conversation

@transfix

@transfix transfix commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Joe found three things on his Android phone (Samsung Keyboard, and it should work with Gboard).

1. The chat box erased what was being typed

On his phone, the chat box erased what was being typed each time the text reached the end of a line.

Reproduced in headless Chromium emulating an Android phone (412 x 915 at DPR 2.625, touch, an Android UA). Words were typed as an Android IME types them: a composition growing a letter at a time, committed at the space. The setup was the 4.0.4 page, with cyprty's own Chat window and with a minimal stacked window holding a text_view and a message_input. Each time the box grew a line, the page's hidden <input> was closed and reopened mid-word. With this emulation the text came out as "at the enend ofof the box ... for aa whwhile". Samsung Keyboard turns the same blur/refocus into an erasure. Without the text_view above the box, nothing happened.

Why:

  1. A text_view that fills its window sizes itself from what followed it last frame. So the frame the message box grows a line, the window's content overflows by a line.
  2. Its scroll bar comes, and the box narrows.
  3. In ImGui 1.92.9, a word-wrapped field whose wrap width changes re-centres its caret (CursorCenterY) and draws no caret for that frame. PlatformImeData.WantVisible is set only on a frame that draws the caret.
  4. The overlay passed that one frame on to the page as "no text wanted". The page reset the hidden input and blurred it, which dismisses the phone's keyboard, and refocused it a frame later.

A trace of the hidden input's events shows the composition (e, en) followed by blur, the reset to two spaces, focus, and the keyboard re-sending end into the fresh field.

Fix (ImGuiOverlay.cpp):

  • The keyboard stays wanted while an editable field is ImGui's active item, whatever that frame's flags say.
  • The hidden input is no longer reset when it runs past 64 characters. That reset changed the field under the keyboard mid-message, which Samsung Keyboard is known to mishandle. Enter, and the field closing, still reset it; so does running short (the two-space trick for Backspace).

2. Panels start shown on a phone (Joe: "show panels everywhere")

  • AriRuntime::load no longer hides a scene document's panels on a phone.
  • ImGuiOverlay::setPhoneHidesPanels is now off by default; a C++ host may still ask for it.
  • ARIADNE.md §5.14 and the pycvc offscreen note follow.
  • Tests: cvcgl_imgui_panels_start (default open everywhere, phones included; asked to, a phone hides them) and cvcgl_ari_switch.

3. Fullscreen sat on the show/hide button

arigl-web's #fullscreen was fixed at right: 8px; bottom: 8px, the same corner as cvcGL's round panels button, and above the canvas, so it took the tap. The repro's screenshots show the two drawn on top of each other. The overlay now publishes how far up its button reaches, in CSS pixels, as --cvcgl-toggle-clear on the page's root. The CSS puts Fullscreen at bottom: calc(var(--cvcgl-toggle-clear, 0px) + 8px).

Checked

  • Native, under Xvfb with llvmpipe and CVC_REQUIRE_RENDER=1: cvcgl_imgui_panels_start passes (17 checks) and cvcgl_ari_switch passes.
  • In the browser, end to end. The same change applies cleanly to v4.0.4, the live page's release. I built arigl for single-threaded wasm from v4.0.4 plus this change, and ran the same emulated-Android repro on it:
    • Typing 159 characters in a stacked chat window, the hidden input saw 0 blurs, 1 focus (the tap) and 0 frames with want false. The box shows the text intact, with no doubled words. Before the change, the same run reset the field three times and doubled words.
    • Loading cyprty's document, the panels show on the phone at once, and Fullscreen sits above the round button instead of on it.
    • Master's own browser build could not be linked here: its -fwasm-exceptions/JSPI flags need wasm deps built for them, and only the 4.0.4-era deps were at hand.
  • Not on a real phone.

The live page runs arigl-web 4.0.4. This reaches it with the next release that the page can take.

… phones; Fullscreen clears the UI button

A chat box on a phone erased (Samsung Keyboard) or doubled (Gboard-style composition) what was being
typed each time it grew a line. In ImGui 1.92.9 a word-wrapped field whose width changes re-centres
its caret and draws none for that frame, and WantVisible is set only on a frame that draws the
caret. The chat log above the box keeps last frame's height for a frame, so the box growing a line
overflows the window, its scroll bar comes, the box narrows, and ImGui reported for one frame that
no text was wanted. The overlay then closed the hidden <input> under the phone's keyboard (reset,
blur) and opened it again a frame later, mid-word. The overlay now keeps the keyboard wanted while
an editable field is ImGui's active item, and no longer resets the hidden input when it runs past
64 characters: a keyboard tracks the field's text itself.

The panels start shown on a phone, as everywhere: AriRuntime no longer hides them for a document
with a scene, and ImGuiOverlay's setPhoneHidesPanels is off by default (a host may still ask).

arigl-web's Fullscreen button sat on the panels' round show/hide button in the bottom-right corner,
and took the tap. The overlay publishes how far up that button reaches (--cvcgl-toggle-clear) and
the page puts Fullscreen above it.
@transfix
transfix merged commit 7f8326d into master Nov 23, 2026
32 checks passed
@transfix
transfix deleted the fix/mobile-ui branch November 23, 2026 20:42
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.

1 participant