mousemove event doesnt fire if mouse is at farest right positon (x axis)

NEW
Assigned to

Status

()

Core
DOM: Events
P3
normal
a year ago
a year ago

People

(Reporter: manuelbaesler, Assigned: stone)

Tracking

51 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160726073904

Steps to reproduce:

enter into the console

document.addEventListener('mousemove', (ev) => console.log(ev.clientX, ev.clientY) );

move mouse to farest right positon
move up and down
-> no mousemove event fires


Actual results:

no mousemove event


Expected results:

mousemove should fire events for mousemovement on the farest right positon

Example:
open firefox in fullscreenmodus, enter the line into the console

document.addEventListener('mousemove', (ev) => console.log(ev.clientX, ev.clientY) );

move the cursor to the farest right position and move up and down.
you wont get any output.

This problem does not occure in Chrome, Opera nor Safari. They all report on farest right up down movement x=2879, which is correct sine farest left position x=0 and screen dimension is x=2880.

Also tested with firefox nightly build.
Might this be related to bug 50511?
Component: Untriaged → DOM: Events
I observed this issue on FF48. Also, it seems the dimension detection is wrong that the position on the far right should have been 1279 on my screen, while I observed numbers more than 1400.

Would you please take a look, Stone?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(sshih)
(Assignee)

Updated

a year ago
Assignee: nobody → sshih
Flags: needinfo?(sshih)
Priority: -- → P3
(Assignee)

Comment 3

a year ago
Only happens on Mac. OK on Windows and Linux.
(Assignee)

Comment 4

a year ago
When the window is maximized on windows, the x range of mousemove is 0-1919 on my pc. The document size is 1920. We can not move outside of the window nor receive mouseout.
Tested on Mac, we fire mouseout in x=0 or 1440. The document width=1440. The x range of mousemove is 3-1437.

Test on chrome (Windows), the document width is 1920, the x range of mousemove is 0~1919. Chrome reports mouseout in x=0 or 1919.
Test on chrome (Mac), the document width is 1440, the x range of mousemove is 0~1439. Chrome reports mouseout in x=0 or 1439.

When moving mouse to the left most or right most position, chrome will fire mouseout, mouseover, then mouse move. Safari behave the same as Chrome
(Assignee)

Comment 5

a year ago
In full screen mode, we fire mouseout in right most position but not in left most position. The EventStateManager::mCurrentTarget is ViewportFrame when mousemove in the right most position and nsSubDocumentFrame in the left most position.
(Assignee)

Comment 6

a year ago
In the case of moving mouse to right most position in full screen mode, PresShell [1] call FindFrameTargetedByInputEvent to get frame for the event with position=right most point. I find it calls nsLayoutUtils::GetFramesForArea to find the hit frames but no frame hit. That induce the event is dispatch to ViewportFrame (set in [2])

[1] https://dxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#7621
[2] https://dxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#7425
You need to log in before you can comment on or make changes to this bug.