Open Bug 1187971 Opened 9 years ago Updated 2 years ago

OS:Fedora. Page is always_scrolled_down the 1st time you scroll with mouse wheel after refocus of Firefox window (AND also DOMMouseScroll reports wrong scroll amount in event.detail. See comment 1)

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: website, Unassigned)

Details

Attachments

(1 file)

I use Focus-follows-mouse policy, but also tried Alt-Tab for focus change. The bug 
appeared in my Fedora 22 Firefox (39.0), and in the nightly build.
 
After using other program and giving Firefox focus back, the first scroll on the page is wrong. It is always a hugh downwards scroll (regardless which direction I turned the mouse wheel actually). 
With some help in the chat I already opened a script which outputs the DOMMouseScroll Values: an excerpt of the log:

ctrlKey: false; type: DOMMouseScroll; detail:4398; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:4395; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:-3; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:-3; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:4392; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:3; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:3; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:4395; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:-3; wheelDelta:undefined
ctrlKey: false; type: DOMMouseScroll; detail:-3; wheelDelta:undefined

The working scrolls (without leaving the window) reported 3 or -3.
The one that lead to errornous scroll behaviour report a high positive 4-digit number (which actually changes in +3/-3 steps, depending on the wheel direction - my guess would be here, that some absolute number is used, when it should be a relative).
Component: File Handling → Event Handling
Summary: Scroll Event reports wrong scroll amount after refocus of Firefox window → DOMMouseScroll reports wrong scroll amount after refocus of Firefox window
I had a conversation with reporter and asked him to test new profile in latest Nightly (42). The issue remained.

STR:
1. Have mouse scroll action "scroll by 3 lines"
2. Open Firefox window
3. Swith to another application
4. Swith back to Fx window using Alt+Tab OR Linux feature "Switch windows by hovering the mouse over a window"
5. Scroll with mouse in any direction

RESULT:
Firefox scrolls one page down

EXPECTATIONS:
Direction and amount of lines should be respected

NOTE:
I provided to the reported this page to test what does event.details contain onDOMMouseScroll. When Firefox behaves abnormally (see RESULT), then event.details contains significantly greater numbers than it should. That's just a test anyway, the main issue is stated in RESULT and EXPECTATIONS
Summary: DOMMouseScroll reports wrong scroll amount after refocus of Firefox window → OS:Fedora. Page is always_scrolled_down the 1st time you scroll with mouse wheel after refocus of Firefox window (AND also DOMMouseScroll reports wrong scroll amount in event.detail. See comment 1)
After I did a update today, the behaviour  has changed:

Reproducible as before, but the Result has changed.

Old Result was:
Firefox scrolls one page down.

New Result is:
Nothing is done (just for the first scroll after a refocus, all following are good).

At least this behaviour is not so annoying as the old.

What changed: 
The update changed 326 packages, so I omit the listing of all of them. 
Firefox did NOT changed, but several libraries that are used, esp. gtk and libinput (indirect via X).
As no other program (tried also other browsers, like chrome and opera) skips the scroll after refocus, my guess is still that Firefox is responsible for the error (maybe by misinterpreting/using api wrong (esp. considering the X switch to libinput), racecondition ...).
No, APZ is disabled.
Component: Event Handling → User events and focus handling
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: