Closed Bug 1248766 Opened 4 years ago Closed 4 years ago

Youtube adds extra MozMousePixelScroll listener to menu every time I move mouse over it


(Web Compatibility :: Desktop, defect)

Not set


(Not tracked)



(Reporter: arni2033, Unassigned)




(Whiteboard: [contactready] [country-all])


(1 file)

>>>   My Info:   Win7_64, Nightly 47, 32bit, ID 20160212030242


1. Open
2. Make sure menu is opened at the left side. If it's not, click menu button (≡) on the site
3. Open devtools toolbox or resize the window to reduce it's height,
   so that visible part of menu was small enough (~1/4 of the list's height)
4. Repeat Steps 5-7 several times
5. Hover mouse over the scrollbar in menu (on the site).
6. Rotate mouse wheel down once. Rotate mouse wheel up once
7. Move mouse to the content area to the right (away from menu)

 Each time you perform Steps 5-7, menu is being scrolled more than in the previous time. If you check
 Inspector, you'll see that extra MozMousePixelScroll listeners are added to #appbar-guide-menu

 Menu should be scrolled equal amount of pixels every time I rotate mouse wheel over menu.

1) I have a very many options in that menu (in my account), and that menu is supposed to be scrolled
   by 1-2 items per mouse wheel rotation. With this bug, rotating mouse wheel basically
   scrolls the list to the end/to the beginning.
2) Doesn't happen on Google Chrome

NI for Karl Dubost:
 Karl, I saw that you had Google contacts (in bug 1199415 comment 16)...
 Could you please tell them to fix this part?
Flags: needinfo?(kdubost)
arni2033, Thanks for the bug report.

Not necessary a bug from Google. 
We need first to understand the source (be in the code of Youtube or in Firefox) before making any effort contacting.

I wonder if kats has an idea and if there is something related to APZ family type of bugs. If it's not outreach let's move it to the appropriate Product.
Flags: needinfo?(kdubost) → needinfo?(bugmail.mozilla)
I can reproduce the problem but from the face of it it doesn't look like it would be APZ related. In fact you can repro the problem without scrolling at all - if you just move the mouse over and out the panel a bunch of times, it will add a new MozMousePixelScroll event listener every time. This happens even if I spoof a Chrome UA string which is kind of surprising, because AFAIK MozMousePixelScroll is mozilla-specific.

I dug through their code a bit and found this:


which looks like they're adding the MozMousePixelScroll based on some conditions that includes a feature detection for MozBoxSizing. More importantly, I didn't see any corresponding removeEventListener call to remove this MozMousePixelScroll event, so I'm fairly confident this is just a codepath that they haven't tested thoroughly and only affects Firefox.
Flags: needinfo?(bugmail.mozilla)
Whiteboard: [contactready] [country-all]
Duplicate of this bug: 1248351
I'm going to email some folks at Google about this.

Thanks, Mike!
And thank Kats for tracking this down!
Everything works OK now - not perfect, but better. And no extra event listeners.
Did somebody actually contacted Youtube devs?
Yep, Andrew did reach out to Google and a Youtube engineer said they had a patch for this (on March 11th).

Going to close as FIXED based on Comment 6.
Closed: 4 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.