Repository navigation
Conversation
|
|
d09c60d to
eac84f4
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 240171 did not find any UI Test snapshots differences. |
|
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. |
dr1rrb
left a comment
There was a problem hiding this comment.
➡️ Medium — 1 medium, 1 low, none blocking.
Approving: the change brings the same above-the-text hit-test as master's UnicodeText.GetIndexAt (#23924), the !extendedSelection path (hyperlink hit-testing) is unchanged, keyboard up/down and gripper drags never reach the new branch, and the new tests fail without the fix.
Suggested pass: drop the Task.Delay(600), then fix the two comments.
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 241132 did not find any UI Test snapshots differences. |
|
|
f741339 to
16ffceb
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 242095 did not find any UI Test snapshots differences. |
|
@Mergifyio backport release/stable/6.7 |
✅ Backports have been createdDetails
|
…6.7/pr-25489 fix(textbox): Place caret by X on a tap above the text (backport #25489)
GitHub Issue: closes unoplatform/kahua-private#531
PR Type:
🐞 Bugfix
What changed? 🚀
On Skia, tapping a
TextBoxin its top border or padding (the few pixels above the text line) moved the caret to the start of the text, whatever the tap's X position. On a tablet, a finger tapping to the right of the content often lands there. The result looks random: the caret goes to the end on one tap and to the start on the next. This was reported on iPad (Skia WebAssembly).Cause:
UnicodeText.GetIndexAtreturned index 0 for any point above the first line (p.Y < 0) whenextendedSelectionis true.Fix: a point above the text now hit-tests the first line by its X position, the same way a point on that line does. This matches master, where the same logic arrived with the RichEditBox parity port (#23924), which is too large to backport. Points below the text are unchanged.
Because the fix is in the shared hit-test, it also changes these paths when the pointer is above the first line:
IsTextSelectionEnabled)Each of them now follows the pointer's X position on the first line instead of jumping to index 0. That is master's current behaviour.
Validation:
New runtime tests:
When_Touch_Tap_Above_Text_Places_Caret_By_X_{Android,iOS}When_Touch_Tap_Above_Multiline_Text_Uses_First_LineWhen_Mouse_Drag_Above_Text_Selects_By_XAll of them fail without the fix, with the caret at 0, and pass with it (Skia desktop).
The full
Given_TextBox/Given_TextBlock/Given_PasswordBoxsuites (375 tests) differ only by the new tests with and without the fix. The one other test that changed,When_Touch_LongPress_Shows_Grippers_Android, failed once in the run without the fix. It passed 6/6 on its own without the fix and doesn't go through this code, so that was a timing flake.Checked on a real iPad (Skia WebAssembly SamplesApp, Safari). A tap on the top border goes to the start without the fix, and to the end with it.
To be backported to
release/stable/6.7after merge.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code