Open Bug 1683259 Opened 4 years ago Updated 1 year ago

[Bug] Moving the cursor should automatically scroll textareas

Categories

(Core :: Layout, defect)

Unspecified
Android
defect

Tracking

()

People

(Reporter: ekager, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

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

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.

dupe

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.

[1] https://searchfox.org/mozilla-central/rev/851bbbd9d9a38c2785a24c13b6412751be8d3253/layout/base/AccessibleCaretManager.cpp#1395-1397

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
Attachment #9385631 - Attachment is obsolete: true
Component: DOM: Selection → Layout
Flags: needinfo?(aethanyc)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: