Because a start of the scroll is too sensitive, drag selection at the edge of page become slightly difficult

RESOLVED INACTIVE

Status

()

RESOLVED INACTIVE
7 years ago
a month ago

People

(Reporter: alice0775, Assigned: masayuki)

Tracking

(Depends on: 1 bug, {regression})

Other Branch
mozilla9
x86
Windows 7
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 3 obsolete attachments)

(Reporter)

Description

7 years ago
Build Identifier:
http://hg.mozilla.org/integration/mozilla-inbound/rev/37cb0a1bc2ce
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110717 Firefox/8.0a1 ID:20110717174939

After landing Bug 644621,
Because a start of the scroll is too sensitive, drag selection at the edge of the page become slightly difficult.

This happens on normal/maximum/fullscreen window.

Reproducible: Always

Steps to Reproduce:
1. Start Firefox with New Profile (without addons)
2. Open any page ( ex. http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=96+hours+ago&enddate=now )
3. Try to select text which is displayed without clipping at the bottom edge of view port. (It is the text of 1.5 lines from the bottom edge of view port)

Actual Results: 
  The page scrolls suddenly when I start dragging horizontally.
  It is difficult to select the text which I aimed at.

Expected Results: 
  The range becoming the trigger should be small (maybe 2-3px from the edge of view port)
  

This happens not only the bottom edge but also top/left/right edge of view port.
(Reporter)

Comment 1

7 years ago
And this happens on ordinary TEXTAREA too
(Reporter)

Comment 2

7 years ago
Screen capture (drag selection of textarea)
http://www.youtube.com/watch?v=48VKWGJGb4E

I will try to select "THIS TEXT" by mouse drag.
I never drag the mouse vertically. however the text area scroll unexpectedly.

It is difficult to select text.
(Reporter)

Updated

7 years ago
Keywords: regression
(Reporter)

Comment 3

7 years ago
Screen capture (drag selection of contents area)
http://www.youtube.com/watch?v=pA1U2uwdYAM

I will try to select "Othe" at top, and "Lineu" at bottom by mouse drag.
I never drag the mouse vertically. however the text area scroll unexpectedly.

It is difficult to select text.
(Reporter)

Comment 4

7 years ago
This happens  on ordinary INPUT too

Screen capture (drag selection of INPUT,  LEFT:Aurora7.0a2, RIGHT:Nightly8.0a1)
http://www.youtube.com/watch?v=dNhRp6LZDfg

I will try to select "ST" at top, and "QR" by mouse drag.
the INPUT scroll unexpectedly.
It is difficult to select text.

Reproduced on latest m-c nightly.
http://hg.mozilla.org/mozilla-central/rev/a0372b031aac
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110718 Firefox/8.0a1 ID:20110718030807
(Reporter)

Comment 5

7 years ago
Created attachment 546594 [details]
a sample html

How difficult to select text.

[STR]
1. Start Nightly 8.0a1 with clean profile
2. Open the attachment "a sample html"
3. Try to select "66666" by mouse dragging

This is also regression of Bug 644621.

Comment 6

7 years ago
(In reply to comment #5)
> Created attachment 546594 [details]
> a sample html
> 
> How difficult to select text.
> 
> [STR]
> 1. Start Nightly 8.0a1 with clean profile
> 2. Open the attachment "a sample html"
> 3. Try to select "66666" by mouse dragging
> 
> This is also regression of Bug 644621.

Confirmed.

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110717 Firefox/8.0a1 ID:20110718045050
I think that a possible way is, when mousedown event happened on an edge, we shouldn't do on edge scroll for the direction but users might be confused by such particular behavior.

And I think that there is another problem. That is mousemove event causes faster scroll. This might make us feel too sensitive.
(Reporter)

Comment 8

7 years ago
Created attachment 546732 [details]
sample html

How difficult to select text.
Try to select "ABC" by mouse dragging.
I have a new idea now. I think that there should be delay for starting auto scrolling on edge. Basically, dragging is an operation for selection. On the other hand, the auto scrolling is an additional feature for that for a11y. Therefore, I think that we can assume that users want to select text when mouse cursor is on edge and *moving*. If mouse cursor stops, we should do scroll.

bug 671187's patch will redesign the timer handling. If it would be granted by reviewers, I could do it easily.
Created attachment 549022 [details] [diff] [review]
Patch part.1 Don't start auto scroll immediately when mouse cursor is on scrollable frame edge

This patch makes delay for starting auto scroll on scrollable element edge. But this isn't enough for this bug fix. Additional approach should be coming...

Note that this patch depends on bug 671187's patches.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Created attachment 549717 [details] [diff] [review]
Patch part.1 Don't start auto scroll immediately when mouse cursor is on scrollable frame edge
Attachment #549022 - Attachment is obsolete: true
Created attachment 549718 [details] [diff] [review]
Patch part.2 Auto scroll speed should be slow down when the scroll target is not large enough
Depends on: 675865
The regression causes are backedout temporarily. But it will be back again soon for mozilla9. See bug 675865.

Please don't close this bug, we need to work on this regression even before relanding them.
Target Milestone: --- → mozilla9
Version: Trunk → Other Branch
Created attachment 556814 [details] [diff] [review]
Patch part.1 Don't start auto scroll immediately when mouse cursor is on scrollable frame edge

This patch makes auto scrolling (only edge scroll) be executed only when synthesized mouse move event is handled. I.e., a real mouse move event cancels pending auto scroll.

By this change, we can give priority for selecting contents rather than auto scrolling.

When mouse cursor is outside of the selection root scrollable element, the real mouse move events cause higher speed scrolling, it's same as current build.
Attachment #549717 - Attachment is obsolete: true
Attachment #556814 - Flags: review?(Olli.Pettay)
Created attachment 556816 [details] [diff] [review]
Patch part.2 Auto scroll speed should be slow down when the scroll target is not large enough

This patch uses slower speed if scrollable element isn't large enough.

The threshold of the size can be specified by prefs.

This patch decreases scroll amount and increases timer delay. If you want to test the speed actually, you can use following builds:
http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=6532a322ed38
Attachment #549718 - Attachment is obsolete: true
Attachment #556816 - Flags: review?(Olli.Pettay)
(Reporter)

Comment 16

7 years ago
(In reply to Masayuki Nakano (Mozilla Japan)(offline: 8/31 and 9/1) from comment #15)

> This patch decreases scroll amount and increases timer delay. If you want to
> test the speed actually, you can use following builds:
> http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=6532a322ed38

The try server still have same problem, see video.

http://www.youtube.com/watch?v=2qipXfyw5o0
http://www.youtube.com/watch?v=erggNGmPyR0

http://hg.mozilla.org/try/rev/6532a322ed38
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a1) Gecko/20110830 Firefox/9.0a1 ID:20110830060853
(In reply to Alice0775 White from comment #16)
> http://www.youtube.com/watch?v=2qipXfyw5o0

When you stop mouse cursor, auto scroll starts after some delay (specified by "ui.mouse.drag.autoscroll.first_delay").

> http://www.youtube.com/watch?v=erggNGmPyR0

The width of the editor is enough size. Therefore, you can select the words which you want to select.

Note that when you're moving mouse cursor, this patch stops auto scrolling. Therefore, it becomes easier you to select any thing, no?
Well, basically, the edge scrolling speed could be slower. Currently, most mice and touchpad have scroll operation.

Another possible approach is, the scroll speed would be increased by repeat. I.e., when auto scroll is started, the scrolling speed is very slow. But if you would keep the mouse cursor for auto scroll, the speed would be increased. I guess if I moved most code in nsFrame::ExpandSelectionByMouseMove() to nsFrameSelection, I could do that easily. I'll try it.
Attachment #556814 - Flags: review?(Olli.Pettay)
Attachment #556816 - Flags: review?(Olli.Pettay)
(Reporter)

Comment 19

7 years ago
(In reply to Masayuki Nakano (Mozilla Japan) from comment #17)
> (In reply to Alice0775 White from comment #16)
> > http://www.youtube.com/watch?v=2qipXfyw5o0
> 
> When you stop mouse cursor, auto scroll starts after some delay (specified
> by "ui.mouse.drag.autoscroll.first_delay").

The behavior of the try server build is wrong.
If mouse is in the scroll region, auto scroll _should_ not start in any case(mouse moving/stopping).
Auto scrolling should trigger when mouse is in the edge of the region or outside of the region.

> 
> > http://www.youtube.com/watch?v=erggNGmPyR0
> 
> The width of the editor is enough size. Therefore, you can select the words
> which you want to select.
> 
> Note that when you're moving mouse cursor, this patch stops auto scrolling.
> Therefore, it becomes easier you to select any thing, no?

The pref seems to do not work.
Even if I set it to 20000 (something triggers after 20sec I think),
However ,the editor scroll immediately and too sensitive. I cannot select a text.

This intended to select from "0" to "m" 
http://www.youtube.com/watch?v=Pm_5Ys2ucC8
(In reply to Alice0775 White from comment #19)
> (In reply to Masayuki Nakano (Mozilla Japan) from comment #17)
> > (In reply to Alice0775 White from comment #16)
> > > http://www.youtube.com/watch?v=2qipXfyw5o0
> > 
> > When you stop mouse cursor, auto scroll starts after some delay (specified
> > by "ui.mouse.drag.autoscroll.first_delay").
> 
> The behavior of the try server build is wrong.
> If mouse is in the scroll region, auto scroll _should_ not start in any
> case(mouse moving/stopping).
> Auto scrolling should trigger when mouse is in the edge of the region or
> outside of the region.

Your mouse cursor in the video is on the edge. Do you understand the "edge" definition which I commented many times?

> > The width of the editor is enough size. Therefore, you can select the words
> > which you want to select.
> > 
> > Note that when you're moving mouse cursor, this patch stops auto scrolling.
> > Therefore, it becomes easier you to select any thing, no?
> 
> The pref seems to do not work.
> Even if I set it to 20000 (something triggers after 20sec I think),
> However ,the editor scroll immediately and too sensitive. I cannot select a
> text.
> 
> This intended to select from "0" to "m" 
> http://www.youtube.com/watch?v=Pm_5Ys2ucC8

Looks like you moved the mouse cursor outside of the scrollable element (you moved mouse cursor over the button which is left of the editor). The delay doesn't work when you move mouse cursor outside.
> which is left of the editor

oops, right of the editor.
(Reporter)

Comment 22

7 years ago
(In reply to Masayuki Nakano (Mozilla Japan) from comment #20)
> (In reply to Alice0775 White from comment #19)
> > (In reply to Masayuki Nakano (Mozilla Japan) from comment #17)
> > > (In reply to Alice0775 White from comment #16)
> > > > http://www.youtube.com/watch?v=2qipXfyw5o0
> > > 
> > > When you stop mouse cursor, auto scroll starts after some delay (specified
> > > by "ui.mouse.drag.autoscroll.first_delay").
> > 
> > The behavior of the try server build is wrong.
> > If mouse is in the scroll region, auto scroll _should_ not start in any
> > case(mouse moving/stopping).
> > Auto scrolling should trigger when mouse is in the edge of the region or
> > outside of the region.
> 
> Your mouse cursor in the video is on the edge. Do you understand the "edge"
> definition which I commented many times?
> 
The mouse pointer is inside scroll region, never going to outseide.
I mean "edge" = on the border.

> > > The width of the editor is enough size. Therefore, you can select the words
> > > which you want to select.
> > > 
> > > Note that when you're moving mouse cursor, this patch stops auto scrolling.
> > > Therefore, it becomes easier you to select any thing, no?
> > 
> > The pref seems to do not work.
> > Even if I set it to 20000 (something triggers after 20sec I think),
> > However ,the editor scroll immediately and too sensitive. I cannot select a
> > text.
> > 
> > This intended to select from "0" to "m" 
> > http://www.youtube.com/watch?v=Pm_5Ys2ucC8
> 
> Looks like you moved the mouse cursor outside of the scrollable element (you
> moved mouse cursor over the button which is left of the editor). The delay
> doesn't work when you move mouse cursor outside.

the mouse pointer is inside of editor
See another video, this intend to select "e",
Recent Nightly: http://www.youtube.com/watch?v=YHMSuF_LEu0
Tryserver: http://www.youtube.com/watch?v=oRQuqVe99gk

I can not select "e" with tryserver.
(In reply to Alice0775 White from comment #22)
> The mouse pointer is inside scroll region, never going to outseide.
> I mean "edge" = on the border.

"edge" isn't border. "edge" includes border, scrollbars and several pixels from them. I documented the definition by the comment in this patch.
https://bugzilla.mozilla.org/attachment.cgi?id=553119&action=diff

> > > > The width of the editor is enough size. Therefore, you can select the words
> > > > which you want to select.
> > > > 
> > > > Note that when you're moving mouse cursor, this patch stops auto scrolling.
> > > > Therefore, it becomes easier you to select any thing, no?
> > > 
> > > The pref seems to do not work.
> > > Even if I set it to 20000 (something triggers after 20sec I think),
> > > However ,the editor scroll immediately and too sensitive. I cannot select a
> > > text.
> > > 
> > > This intended to select from "0" to "m" 
> > > http://www.youtube.com/watch?v=Pm_5Ys2ucC8
> > 
> > Looks like you moved the mouse cursor outside of the scrollable element (you
> > moved mouse cursor over the button which is left of the editor). The delay
> > doesn't work when you move mouse cursor outside.
> 
> the mouse pointer is inside of editor
> See another video, this intend to select "e",
> Recent Nightly: http://www.youtube.com/watch?v=YHMSuF_LEu0
> Tryserver: http://www.youtube.com/watch?v=oRQuqVe99gk
> 
> I can not select "e" with tryserver.

Because you kept mousedown on the edge.
(In reply to Masayuki Nakano (Mozilla Japan) from comment #23)
> > the mouse pointer is inside of editor
> > See another video, this intend to select "e",
> > Recent Nightly: http://www.youtube.com/watch?v=YHMSuF_LEu0
> > Tryserver: http://www.youtube.com/watch?v=oRQuqVe99gk
> > 
> > I can not select "e" with tryserver.
> 
> Because you kept mousedown on the edge.

Er, but the timing of starting auto scroll is too fast when you set the pref as 20000, I'll check it. Maybe I mistook when I marge the patches.
(Reporter)

Comment 25

7 years ago
(In reply to Masayuki Nakano (Mozilla Japan) from comment #23)
> (In reply to Alice0775 White from comment #22)
> > The mouse pointer is inside scroll region, never going to outseide.
> > I mean "edge" = on the border.
> 
> "edge" isn't border. "edge" includes border, scrollbars and several pixels
> from them. I documented the definition by the comment in this patch.
> https://bugzilla.mozilla.org/attachment.cgi?id=553119&action=diff
> 
Why do you need several pixels? I do not understand.
Why do you change existing behavior?


> > > > > The width of the editor is enough size. Therefore, you can select the words
> > > > > which you want to select.
> > > > > 
> > > > > Note that when you're moving mouse cursor, this patch stops auto scrolling.
> > > > > Therefore, it becomes easier you to select any thing, no?
> > > > 
> > > > The pref seems to do not work.
> > > > Even if I set it to 20000 (something triggers after 20sec I think),
> > > > However ,the editor scroll immediately and too sensitive. I cannot select a
> > > > text.
> > > > 
> > > > This intended to select from "0" to "m" 
> > > > http://www.youtube.com/watch?v=Pm_5Ys2ucC8
> > > 
> > > Looks like you moved the mouse cursor outside of the scrollable element (you
> > > moved mouse cursor over the button which is left of the editor). The delay
> > > doesn't work when you move mouse cursor outside.
> > 
> > the mouse pointer is inside of editor
> > See another video, this intend to select "e",
> > Recent Nightly: http://www.youtube.com/watch?v=YHMSuF_LEu0
> > Tryserver: http://www.youtube.com/watch?v=oRQuqVe99gk
> > 
> > I can not select "e" with tryserver.
> 
> Because you kept mousedown on the edge.
So, I think the try server's behavior is wrong.
Because I can select the text with recent build, but cannot with the tryserver build.
(In reply to Alice0775 White from comment #25)
> (In reply to Masayuki Nakano (Mozilla Japan) from comment #23)
> > (In reply to Alice0775 White from comment #22)
> > > The mouse pointer is inside scroll region, never going to outseide.
> > > I mean "edge" = on the border.
> > 
> > "edge" isn't border. "edge" includes border, scrollbars and several pixels
> > from them. I documented the definition by the comment in this patch.
> > https://bugzilla.mozilla.org/attachment.cgi?id=553119&action=diff
> > 
> Why do you need several pixels? I do not understand.

If there is no scrollbars and border, you cannot scroll by edge scroll.

> Why do you change existing behavior?

See bug 644621.
(Reporter)

Comment 27

7 years ago
(In reply to Masayuki Nakano (Mozilla Japan) from comment #26)
> (In reply to Alice0775 White from comment #25)
> > (In reply to Masayuki Nakano (Mozilla Japan) from comment #23)
> > > (In reply to Alice0775 White from comment #22)
> > > > The mouse pointer is inside scroll region, never going to outseide.
> > > > I mean "edge" = on the border.
> > > 
> > > "edge" isn't border. "edge" includes border, scrollbars and several pixels
> > > from them. I documented the definition by the comment in this patch.
> > > https://bugzilla.mozilla.org/attachment.cgi?id=553119&action=diff
> > > 
> > Why do you need several pixels? I do not understand.
> 
> If there is no scrollbars and border, you cannot scroll by edge scroll.
> 
> > Why do you change existing behavior?
> 
> See bug 644621.

ha? I tried all case in the normal mode, not fullscreen/Maximize mode.
(In reply to Alice0775 White from comment #27)
> > > Why do you change existing behavior?
> > 
> > See bug 644621.
> 
> ha? I tried all case in the normal mode, not fullscreen/Maximize mode.

Hmm, I guess you don't read the comments of the bug...
(Reporter)

Comment 29

7 years ago
I suggest that

1.Enable the tryserver's function when mouse pointer contacted with the edge of screen for the first time.
   And continue the tryserver's behavior  while dragging selection.

2. Otherwise keep existing behavior.
(Reporter)

Comment 30

7 years ago
I mean the edge of screen:
x=0 or y=0 or x = screen.availWidth or y= screen.availHeight
Hi, I send email (written in Japanese) about bug 644621.

(In reply to Alice0775 White from comment #29)
> I suggest that
> 
> 1.Enable the tryserver's function when mouse pointer contacted with the edge
> of screen for the first time.
>    And continue the tryserver's behavior  while dragging selection.
> 
> 2. Otherwise keep existing behavior.

I don't think such stateful behavior is good solution. User may be confused the difference of the behavior if he/she doesn't know the condition for switching behavior. And in code level, such state might make complicated code.

And on my environment, "ui.mouses.drag.autoscroll.first_delay" works fine.
(Reporter)

Comment 32

7 years ago
(In reply to Masayuki Nakano (Mozilla Japan) from comment #31)
> Hi, I send email (written in Japanese) about bug 644621.
> 
> (In reply to Alice0775 White from comment #29)
> > I suggest that
> > 
> > 1.Enable the tryserver's function when mouse pointer contacted with the edge
> > of screen for the first time.
> >    And continue the tryserver's behavior  while dragging selection.
> > 
> > 2. Otherwise keep existing behavior.
> 
> I don't think such stateful behavior is good solution. User may be confused
> the difference of the behavior if he/she doesn't know the condition for
> switching behavior. And in code level, such state might make complicated
> code.
> 
I do not know the code.
but I easily think that a condition of the trigger of auto scrolling is changed from "When you stop mouse cursor" to "When mouse pointer contacted with the edge of screen for the first time".
(Reporter)

Updated

a month ago
Status: ASSIGNED → RESOLVED
Last Resolved: a month ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.