Open Bug 1683259 Opened 3 years ago Updated 2 years ago

[Bug] Moving the cursor should automatically scroll textareas


(Core :: DOM: Selection, defect)





(Reporter: ekager, Unassigned, NeedInfo)


(Blocks 1 open bug)


From github:

Steps to reproduce

write a long search query into github issues search box

Expected behavior

The cursor would scroll the textarea

Actual behavior

I noticed that when you're editing a search query in the issues page of a GitHub repo, when you move the cursor of a long query Firefox doesn't automatically scroll the textbox. The cursor also scrolls vertically when it can only scroll horizontally. Pretty annoying.

Device information

  • Android device: ?
  • Fenix version: Today's Nightly

Change performed by the Move to Bugzilla add-on.


Flags: needinfo?(agi)

Looks like this isn't a duplicate after all. Sending to APZ since this is about cursor and scrolling.

Component: General → Panning and Zooming
Flags: needinfo?(agi)
Product: GeckoView → Core

Moving to DOM: Selection (I think this is the successor of what used to be the Layout: Text Selection component?) as the cursor behaviour is handled by AccessibleCaret.

Component: Panning and Zooming → DOM: Selection

I played the description of comment#0 a bit on Window Surface Pro and also Android.
What I notice is that the threshold to trigger scroll left and right are different.
So it is easy to move the cursor to scroll left, but you need to move the cursor far enough to the right to trigger scroll right.
And it seems there isn't enough space on Android device to make scroll right work?

TYLin might have some idea about this.

Flags: needinfo?(aethanyc)

AccesibleCaret uses the same underlying auto scroll mechanism [1] like extending a selection hightlight by dragging a mouse to the right edge of an <input> on the desktop. In fact, this bug can also be reproduced on desktop by setting layout.accessiblecaret.enabled=true and layout.accessiblecaret.hide_carets_for_mouse_input=false.

Dragging mouse to extend the selection works fine. In my testing, as soon as the mouse touching the right edge of the <input>, it starts scrolling. We can investigate this by checking the frame and the pointer that AccessibleCaret gives to the StartAutoScrollTimer API. That can give us a better sense of what goes wrong.


Flags: needinfo?(aethanyc)

If I move the mouse cursor to middle of the <input> element and slide my mouse to the right, it works as expected. So, a different thing from nsIFrame::HandleDrag() is, mouse event is fired outside the <input> element due to the accessible caret position.

Flags: needinfo?(aethanyc)
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.