The Text Cursor Indicator would not update its position until press arrow key or click on contentarea
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | wontfix |
| firefox147 | --- | wontfix |
| firefox148 | --- | fixed |
| firefox149 | --- | fixed |
People
(Reporter: alice0775, Assigned: Jamie)
References
(Blocks 3 open bugs, Regression)
Details
(Keywords: nightly-community, regression, Whiteboard: [uiaFastFollow])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
When I test Bug 2012252, I found another bug.
Steps to reproduce:
- Start > Settings > Accessibility > Text cursor> turn
Text cursor indicatortoon - Open
data:text/html,<script>document.designMode="on";</script><body><p><br></p></body> - Type text
Actual results:
The Text Cursor Indicator would not update its position.
Expected results:
The text cursor indicator should follow the text insertion point.
MS Edge/Google Chrome works as expected.
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=fc75de6654182fd09d97d4d34e9b96c6ea7895e8&tochange=327aa1eaa276c313c05ed83174c06958ed788799
Comment 1•1 month ago
|
||
Set release status flags based on info from the regressing bug 1951833
:Jamie, since you are the author of the regressor, bug 1951833, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•1 month ago
|
||
Investigation note: Once there is text before it, moving the caret to the <br> and then calling UiaTextRange::GetBoundingRectangles on the caret range returns nothing. No idea why yet.
| Assignee | ||
Updated•1 month ago
|
Comment 3•1 month ago
|
||
Does this also depend on the accessibility.uia.enable pref?
Updated•1 month ago
|
| Reporter | ||
Comment 4•1 month ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #3)
Does this also depend on the
accessibility.uia.enablepref?
Setting accessibility.uia.enable to 0 and 1 did not fix this issue.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 5•1 month ago
•
|
||
| Assignee | ||
Comment 6•1 month ago
|
||
This was breaking Text Cursor Indicator when typing into an impacted text box.
This was caused by a cascade of problems:
- When the caret is at the end of the line before the paragraph, it is actually at the end of line insertion point. Previously, we weren't identifying that correctly.
- This happened because the caret was positioned after the first line in the container, but because TextLeafPoint can't represent a position that isn't within a leaf, we were translating it to the first character of the paragraph, thus losing the information we require to determine that it is an end of line insertion point. We now handle this case explicitly when translating the HyperText caret offset into a TextLeafPoint.
- GetCaretRect vertically aligns the rect to the top of the line. To do this, it relies on mIsEndOfLineInsertionPoint being set correctly, which it wasn't previously. Thus, GetCaretRect was using the first character on the next line, resulting in a rect with negative height.
- UIA calls TextLeafRange::LineRects, which clips the bounds to the content area. Since the caret rect previously had negative height, it was clipped completely and removed. Thus, UIA previously returned no bounds at all.
All of this is fixed by correctly setting mIsEndOfLineInsertionPoint in this case.
Updated•1 month ago
|
Comment 8•1 month ago
|
||
| bugherder | ||
Comment 9•1 month ago
|
||
:Jamie, do you want to consider adding an uplift request for beta?
ESR140 is also affected, not sure if it should be uplifted there also?
| Assignee | ||
Comment 10•1 month ago
|
||
I'll submit an uplift request for beta. ESR140 doesn't have UIA enabled, and even though comment 4 notes that this was not affected by toggling the UIA pref, I'm still not sure whether this patch will fixthe issue with UIA disabled. We can't properly support Text Cursor Indicator with UIA disabled anyway. So, I'm not going to uplift this to ESR.
| Assignee | ||
Comment 11•1 month ago
|
||
This was breaking Text Cursor Indicator when typing into an impacted text box.
This was caused by a cascade of problems:
- Previously, we explicitly never set mIsEndOfLineInsertionPoint to true at the start of a paragraph. This is exactly the case we're dealing with here and that behaviour is incorrect. Instead, we now have a much narrower check for the specific exception we're trying to detect: the start of the editor.
- GetCaretRect vertically aligns the rect to the top of the line. To do this, it relies on mIsEndOfLineInsertionPoint being set correctly, which it wasn't previously. Thus, GetCaretRect was using the first character on the next line, resulting in a rect with negative height.
- UIA calls TextLeafRange::LineRects, which clips the bounds to the content area. Since the caret rect previously had negative height, it was clipped completely and removed. Thus, UIA previously returned no bounds at all.
All of this is fixed by correctly setting mIsEndOfLineInsertionPoint in this case.
Original Revision: https://phabricator.services.mozilla.com/D281126
Updated•1 month ago
|
Comment 12•1 month ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: The Windows Text Cursor Indicator (accessibility feature) will not be positioned correctly when typing at the end of a line in some cases.
- Code covered by automated testing: yes
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Code specific to accessibility caret calculation. Covered by multiple automated tests.
- String changes made/needed: none
- Is Android affected?: no
Updated•1 month ago
|
Updated•1 month ago
|
Comment 13•1 month ago
|
||
| uplift | ||
Description
•