Open Bug 1139302 Opened 9 years ago Updated 2 years ago

Lightning scrolls way too fast if mouse settings "smooth scrolling" is enabled

Categories

(Calendar :: Calendar Frontend, defect)

Lightning 3.3
x86_64
Windows
defect

Tracking

(Not tracked)

People

(Reporter: highwaykind, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36

Steps to reproduce:

Have Smooth Scrolling enabled in mouse settings.


Actual results:

The smallest scroll goes straight to the top or bottom of the screen. No fine-tuning to get the right thing in the center of the screen is possible, unless you "grab" the sidebar or click on the arrows.


Expected results:

Expected: Scrolling like in any other window, in much smaller increments. 

Semi Fix: Scrolling is as expected with Smooth Scrolling disabled, but then obviously all scrolling on all of the computer is more jagged. 

It's only the Calendar Tab in Thunderbird (31.5.0) this happens in, the mail/inbox Tab scrolls perfectly fine with Smooth Scrolling enabled. Leading me to think this is a bug in the Lightning addon.
OS: All → Windows 8.1
Hardware: All → x86_64
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 8.1 → Windows
Summary: Lightning in Thunderbird scrolls way too fast if smooth scrolling is enabled → Lightning scrolls way too fast if mouse settings "smooth scrolling" is enabled
Attached patch wip patch for month view (obsolete) — — Splinter Review
I've found  mouse + drivers with the option "smooth scrolling" so I've tried to figure out the issue.

When the option is disabled, only one DOM event "wheel" [1] occurs for every single tick of the mouse wheel and the property deltaY is equal to the number of lines for the vertical scroll that the user has set in the mouse settings "lines at a time" (3 is a typical case).
With the option enabled, instead, a lot of events "wheel" occur for every single tick of the wheel. The number of events and the values of deltaY depend on the rotation speed of the wheel. Typical values for deltaY are a fraction of the number of lines set in the mouse options (e.g. 0.025, 0.1, 0.375 ...).

This is a wip patch for the month view but the bug is reproducible in day/week views and minimonth as well.

For me it works fine with and without the "smooth scrolling" enabled but to get a good behavior for different values of the mouse setting "lines at a time", the variable |delta| for the case DOM_DELTA_LINE, should be set equal to the mouse setting, tough I haven't found a way to do it yet.
delta = 3 is a good compromise for different settings, it isn't perfect tough.

I think that the behavior also depends on the mouse and its dynamics about the rotation of the wheel, for this reason would be useful if someone that experiences the bug could try the patch.



[1] https://dxr.mozilla.org/comm-central/source/calendar/base/content/calendar-month-view.xml#1105
I can try the patch, but need some guidance on how to install the patch (and remove it if necessary). I have Windows 10, 64 bit, Thunderbird 52.0b1 (32 bit), Lightning 5.4b1
@ Shawn Metzler
I've sent you an e-mail.
I am using a Logitech M557 Bluetooth mouse.

My scrolling size is set at 6 lines and smooth scrolling. 

With the patch, when I tried using the mouse wheel it was much improved. Thank you. It did not skip randomly a year or "X" number of months ahead or back.

One issue I noticed was the delay in the months changing. When I move my mouse wheel once (I guess one click of the wheel) to change to the next month, it seems to take around 1-2 seconds for the next month to appear or not at all. If I then moved the wheel again, then it worked or it remembered my last movement and jumped ahead / behind a few months.

I then tested with "smooth scrolling" turned off at 3 and 6 lines. I then retested 3 and 6 lines with "smooth scrolling" enabled. At least in my tests, I did not really see much of a difference between any of the settings. For me, the patch improved the use of the wheel, but changing the mouse settings (smooth scrolling) did not seem to have much of an impact on scrolling through the month calendar.
Attached patch patch - v1 — — Splinter Review
Thanks again for the test, Shawn.
As I've already said to Shawn, I think that this issue depends also on the mouse because for me there isn't the delay that Shawn mentioned in the previous comment. For me, with a mouse setting of 6 lines (and "smooth scrolling" enabled), the patch still works fine, though a little bit worse than the settings with 3 lines.

Unless we find a better way to fix, the only thing I can imagine is to use a parameter that the user can change, e.g. with an hidden preference, to adapt the behavior of different mice when "smooth scrolling" is enabled.


The issue affects:

month/multiweek view
week/day view
minimonth scroll months
minimonth scroll years
datetimepickers scroll hours
datetimepickers scroll minutes

All of these cases are completely unusable with the setting "smooth scrolling" enabled. The patch makes the cases working and makes the behavior with and without the setting almost equal (hopefully for all). 


MakeMyDay, Markus, Philipp, could one of you, with a mouse with the option "smooth scrolling", take care of testing a bit this patch in order to see if it is usable? 
Please delete the review flag if you can't test.

Here the builds for all the platforms:
http://ftp.mozilla.org/pub/calendar/lightning/try-builds/bv1578@gmail.com-524ad9e94c3c1728bff0bca235b054248b5ec0b6/
Attachment #8834938 - Attachment is obsolete: true
Attachment #8838270 - Flags: feedback?(philipp)
Attachment #8838270 - Flags: feedback?(makemyday)
Attachment #8838270 - Flags: feedback?(Markus)
Just for the record, in this file I report what happens when the "smooth scrolling" setting is enabled.
The DOM event "wheel" occurs every 15-30-50 ms while the wheel spins, with values of the parameter "deltaY" (for vertical scroll) that is extremely variable depending on the acceleration of the wheel.

Obviously without "smooth scrolling" only one "wheel" event occurs for every "tick" of the wheel, deltaY is constant and is equal to the mouse setting "scroll lines" e.g. 1, 3, 6.
Comment on attachment 8838270 [details] [diff] [review]
patch - v1

Sorry, I currently don't have an external mouse around for testing.
Attachment #8838270 - Flags: feedback?(makemyday)
Since I don't have a windows build environment and no mouse on my linux system at th moment, I made a try-build with the patch.
Maybe anyone else can use this:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=5a66e3effc07e94a184600fff039528d8307d369
Comment on attachment 8838270 [details] [diff] [review]
patch - v1

Hmm, it looks like Windows 10 has removed this setting, so unfortunately I can't say, if the patch works...
Attachment #8838270 - Flags: feedback?(Markus) → feedback-
Comment on attachment 8838270 [details] [diff] [review]
patch - v1

I don't have a windows machine readily available, so unfortunately I cannot test. What about the hwknd or Shawn? Maybe they can help out? The idea looks great though.
Attachment #8838270 - Flags: feedback?(philipp)
If have the symptoms and I can reproduce it.  
The scroll wheel feature is available in the Logitech setpoint software. I could test TB exe. 
(But I can not compile a version.)
Component: Lightning Only → Calendar Views
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: