Closed Bug 1657256 Opened 4 years ago Closed 4 years ago

Scrolling between text selection actions creates offset for selection cursor

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- wontfix
firefox80 --- wontfix
firefox81 --- fixed
firefox82 --- fixed

People

(Reporter: m_kato, Assigned: TYLin)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

From https://github.com/mozilla-mobile/fenix/issues/13208.

Environment

  • Firefox 81 (2020-08-04) on Windows 10
  • Fenix Nightly

Steps to reproduce

  1. Open a website with selectable text, e.g. https://www.mozilla.org/en-GB/mission/
  2. Select some text
  3. Scroll down while still keeping the selected part in your viewport
  4. Drag the lower selection cursor down

Expected behavior

The lower selection cursor follows the touch pointer.

###Actual behavior
The lower selection cursor jumps below the context menu and now has an offset to the touch pointer.

Notes

This also occurs on Windows too. So it isn't related to GeckoView. I guess that this issue is accessibility caret.

Flags: needinfo?(aethanyc)

mozregression gives me this range, so this bug should be a regression by bug 1526268.

Assignee: nobody → aethanyc
Severity: -- → S3
Status: NEW → ASSIGNED
Component: DOM: Selection → Layout
Flags: needinfo?(aethanyc)
Priority: -- → P1
Regressed by: 1526268
Has Regression Range: --- → yes

During scrolling, the caret's position relative to the
custom-content-container (cached in mImaginaryCaretRectInContainerFrame)
may not change, but its position relative to root frame can (cached in
mImaginaryCaretRect).

We need to update mImaginaryCaret each time we are in SetPosition().
Otherwise, the caret still remembers its pre-scrolling old position next
time when we drag it, resulting the caret jumping to its old
pre-scrolling position suddenly.

Note this bug only occurs on the root scroll frame where the APZ is
enabled, not in any sub-scroll frames where APZ is disable when the
caret is shown.

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/9373ef216922 Always update the cached mImaginaryCaretRect in SetPosition(). r=marionette-reviewers,mats,whimboo
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Is this likely to be a noticeable regression for users upgrading from Fennec to Fenix? If so, should we consider uplifting to Beta for 81?

Flags: needinfo?(aethanyc)

Comment on attachment 9172736 [details]
Bug 1657256 - Always update the cached mImaginaryCaretRect in SetPosition().

Beta/Release Uplift Approval Request

  • User impact if declined: After scrolling, the caret can jump to the wrong place rather than following the finger smoothly.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): A small patch that caches a value eagerly, which is essential to calculate the caret's position.
  • String changes made/needed:
Flags: needinfo?(aethanyc)
Attachment #9172736 - Flags: approval-mozilla-beta?

(In reply to Ryan VanderMeulen [:RyanVM] from comment #5)

Is this likely to be a noticeable regression for users upgrading from Fennec to Fenix? If so, should we consider uplifting to Beta for 81?

Yes, it's noticeable, and is reported originally as a fenix issue https://github.com/mozilla-mobile/fenix/issues/13208

Comment on attachment 9172736 [details]
Bug 1657256 - Always update the cached mImaginaryCaretRect in SetPosition().

Approved for 81.0b6.

Attachment #9172736 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: