Repository navigation
fix(wasm): Size the invisible text input to the content area - #24556
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The overlay positioning has an unresolved RTL issue, and the position behavior lacks regression coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Updates the WASM invisible text input to follow the TextBox content area instead of shrink-wrapped text, with runtime coverage for stable sizing during typing.
Changes:
- Sizes and positions the browser input from
ContentElement. - Adds a WASM runtime test validating width stability.
| File | Description |
|---|---|
BrowserInvisibleTextBoxViewExtension.cs |
Updates invisible input sizing and positioning. |
Given_TextBox.skia.cs |
Adds DOM-based WASM regression coverage. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24556/wasm-skia-net9/index.html |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new runtime tests do not clean up WindowContent, allowing focused DOM state to leak into subsequent tests.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Resolved since last review (2)
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24556/wasm-skia-net9/index.html |
|
The build 234612 found UI Test snapshots differences: Details
|
These tests were written before master gained a per-host placement policy for the shared invisible <input />. Rebasing them on top of it left them asserting tracking geometry unconditionally, which iOS hosts (input parked off-screen, size and position ignored) and any session where accessibility has detached the input would both fail. Reuse the probe helpers master already has instead of a second copy, and skip where there is deliberately nothing to measure — both policies are pinned by When_Focused_In_Browser_Then_Hidden_Input_Placement_Matches_Host.
2544cd3 to
de751c5
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The tests can inspect a stale shared input if focus acquisition fails, so focus ownership must be asserted.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Resolved since last review (1)
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24556/wasm-skia-net9/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24556/wasm-skia-net9/index.html |
|
The build 234798 found UI Test snapshots differences: Details
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
|
@Mergifyio backport servicing/6.8 |
✅ Backports have been createdDetails
Cherry-pick of bdbb268 has failed: Cherry-pick of c7e93ab has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
…r-24556 fix(wasm): Size the invisible text input to the content area (backport #24556)
|
@Mergifyio backport release/stable/6.7 |
✅ Backports have been createdDetails
Cherry-pick of bdbb268 has failed: Cherry-pick of c7e93ab has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
…6.7/pr-24556 fix(wasm): Size the invisible text input to the content area (backport #24556)


GitHub Issue: Tracked internally.
PR Type:
🐞 Bugfix
What changed? 🚀
The invisible
<input />the WASM head keeps in the DOM for text entry was sized and positioned fromTextBoxView.DisplayBlock. The DisplayBlock shrink-wraps the text, so the element tracked the text rather than the field.This was latent for a long time, because the TS wrote a unitless value:
Once the unit was added, the sizing took effect and the element started growing by a character's width on every keystroke. Browser password managers bind to that
<input />(it carriestype="password"andautocomplete="password") and anchor their affordances to its bounds — so the badge sat at the left edge of an empty PasswordBox and marched right as the user typed.UpdateSizeandUpdatePositionnow track the ContentElement minus its padding, which is whatOverlayTextBoxViewExtensionalready does on the other Skia targets. Moving the position to the same anchor keeps the element on its field when long text scrolls horizontally orTextAlignmentshifts the DisplayBlock.Adding the CSS unit was correct and is left as-is — it only exposed this.
Verification
Measured the real
#uno-inputbounds in Chrome against SamplesApp's search TextBox, typing 10 characters. Identical builds, only this change differing:The one-time 216 → 184 step after the first character is the DeleteButton appearing on the focused non-empty TextBox, which genuinely narrows the ContentElement. It happens once, not per character.
The added runtime test was confirmed to fail without the fix (
expected value <182> and actual value <1>) and pass with it.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code