107.26 KB, image/png
Created attachment 8719967 [details] screenshot 1 - Youtube adds extra MozMousePixelScroll listener to menu.png >>> My Info: Win7_64, Nightly 47, 32bit, ID 20160212030242 Screencast: > https://dl.dropboxusercontent.com/s/hfh41vof1ky6vm4/screencast%201%20-%20Youtube%20adds%20extra%20MozMousePixelScroll%20listener%20to%20menu.webm?dl=0 STR: 1. Open https://www.youtube.com/ 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) AR: 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 ER: Menu should be scrolled equal amount of pixels every time I rotate mouse wheel over menu. Notes: 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?
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: a.addEventListener?"mouseenter"==b&&h?a.addEventListener("mouseover",k,d):"mouseleave"==b&&h?a.addEventListener("mouseout",k,d):"mousewheel"==b&&"MozBoxSizing"in window.document.documentElement.style?a.addEventListener("MozMousePixelScroll",k,d):a.addEventListener(b,k,d):a.attachEvent("on"+b,k); 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.
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.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.