Closed Bug 1248254 Opened 4 years ago Closed 4 years ago

Firefox/Android with paired/external mouse has wrong hit calculation for enter/over/leave/out

Categories

(Firefox for Android :: General, defect)

44 Branch
Unspecified
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 47
Tracking Status
firefox45 --- affected
firefox46 --- fixed
firefox47 --- fixed

People

(Reporter: redux, Assigned: rbarker)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36

Steps to reproduce:

With Firefox on Android with a paired/external mouse, go to this basic test page http://patrickhlauke.github.io/touch/tests/event-listener.html (which outputs all sorts of events fired on the test button, including mouseover/mouseenter/mouseleave/mouseout). Move the mouse over the button.


Actual results:

There appears to be a vertical mismatch between the position of the button as seen on the screen, and the position where the mouse pointer triggers mouseover/mouseenter/mouseleave/mouseout events. This vertical mismatch seems to be exactly the size of the Firefox UI at the top of the screen - leading me to believe that Firefox is somehow getting the ABSOLUTE position of the mouse cursor on the Android screen to determine hit testing for these events, rather than compensating for the vertical offset of its web content view caused by its UI). See https://www.youtube.com/watch?v=9l8kskIUNnc

Worth noting that when actually clicking the mouse button, the hit testing seems to be happening correctly - see https://www.youtube.com/watch?v=yU8UEtzy4j0


Expected results:

mouseover/mouseenter/mouseleave/mouseout should only be fired when the actual button is hovered/unhovered with the mouse...
OS: Unspecified → Android
Component: Untriaged → General
Product: Firefox → Firefox for Android
I believe Snorp said that Randal is working on this. Do we have something on file?
Flags: needinfo?(rbarker)
(In reply to Kevin Brosnan [:kbrosnan] from comment #1)
> I believe Snorp said that Randal is working on this. Do we have something on
> file?

Bug 1232338 - [parity] Hover from input devices does not get passed on to page CSS/javascript

I have a patch and will post it soon but it requires that Bug 1242690 land first. This is also broken in Aurora and Beta in that the Toolbar offset is not subtracted from the event. That is an easy fix if we want to uplift.
Flags: needinfo?(rbarker)
Assignee: nobody → rbarker
Attachment #8723619 - Flags: review?(snorp) → review+
Comment on attachment 8723619 [details] [diff] [review]
0001-Bug-1248254-Firefox-Android-with-paired-external-mouse-has-wrong-hit-calculation-for-enter-over-leave-out-16022508-0481bde.patch

Approval Request Comment
[Feature/regressing bug #]:Fix for issue cause by dynamic tool bar
[User impact if declined]:Mouse hover events in Fennec will continue to be offset by the height of the dynamic toolbar when it is visible. Things like mouse over/enter/exit etc. will be broken.
[Describe test coverage new/current, TreeHerder]: Since we don't test real mouse hover events in Fennec, there aren't any. I did test android TalkBack to make sure accessibility is not broken with this patch. 
[Risks and why]: This will only affect users with pointer devices that create hover events and does not affect touch events. This patch only adjusts the position of the pointer hover event to account for the height of the dynamic tool bar so the risk should be minimal. We currently do no support touch hover events in Fennec.
[String/UUID change made/needed]:none.
Attachment #8723619 - Flags: approval-mozilla-beta?
Attachment #8723619 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/525acdb20f3a
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Please note that this does not fix nightly due to APZ. This patch is intended to fix Aurora and Beta which are both still using JPZ. Bug 1232338 is required to fix this issue on nightly.
Comment on attachment 8723619 [details] [diff] [review]
0001-Bug-1248254-Firefox-Android-with-paired-external-mouse-has-wrong-hit-calculation-for-enter-over-leave-out-16022508-0481bde.patch

Sorry but this is too late for 45 as we will ship in a week but taking it in 46.
Attachment #8723619 - Flags: approval-mozilla-beta?
Attachment #8723619 - Flags: approval-mozilla-beta-
Attachment #8723619 - Flags: approval-mozilla-aurora?
Attachment #8723619 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.