Repository navigation
mobile: the keyboard stays up while a field is edited; panels show on phones; Fullscreen clears the UI button - #1497
Merged
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_viewand amessage_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 thetext_viewabove the box, nothing happened.Why:
text_viewthat 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.CursorCenterY) and draws no caret for that frame.PlatformImeData.WantVisibleis set only on a frame that draws the caret.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-sendingendinto the fresh field.Fix (
ImGuiOverlay.cpp):2. Panels start shown on a phone (Joe: "show panels everywhere")
AriRuntime::loadno longer hides a scene document's panels on a phone.ImGuiOverlay::setPhoneHidesPanelsis now off by default; a C++ host may still ask for it.cvcgl_imgui_panels_start(default open everywhere, phones included; asked to, a phone hides them) andcvcgl_ari_switch.3. Fullscreen sat on the show/hide button
arigl-web's
#fullscreenwas fixed atright: 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-clearon the page's root. The CSS puts Fullscreen atbottom: calc(var(--cvcgl-toggle-clear, 0px) + 8px).Checked
CVC_REQUIRE_RENDER=1:cvcgl_imgui_panels_startpasses (17 checks) andcvcgl_ari_switchpasses.wantfalse. The box shows the text intact, with no doubled words. Before the change, the same run reset the field three times and doubled words.-fwasm-exceptions/JSPI flags need wasm deps built for them, and only the 4.0.4-era deps were at hand.The live page runs arigl-web 4.0.4. This reaches it with the next release that the page can take.