question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: on Firefox the mouse wheel doesn't work if the mouse cursor is on a youtube embedded video

See original GitHub issue

I explained the problem here http://stackoverflow.com/questions/19316625/firefox-scrolling-iframe-that-contains-embed-youtube-video .

The demo is here http://plnkr.co/edit/VHgjplC9o57b0rickPZt?p=preview (open it with Firefox).

Try the demo, scroll inside the iframe in the page.

I report the explained problem from stackoverflow: **************** from http://stackoverflow.com/questions/19316625/firefox-scrolling-iframe-that-contains-embed-youtube-video

` Scenario

My page p1 contains an iframe. The iframe points to a page p2 containing an embedded video from youtube.

Problem

The problem is that if I scroll (by mouse) the page inside the iframe, it scrolls normally only if the mouse cursor isn’t on a youtube embdedded video.

But if the mouse cursor is on a youtube embedded video, the page p2 inside the iframe stops to scroll, while the external page p1 starts to scroll.

How can avoid this no normal behaviour?

I expect that even if the mouse cursor is on the youtube embedded video, the page inside the iframe continues to scroll normally, and it doesn’t loose the mousewheel event.

Failed solutions

I tried to add the attribute wmode=“transparent” to the iframe tag of youtube embedded video, but it doesn’t solve the problem.

Details

To scroll inside the iframe I’m using a plugin that substitues the scrollbar.

Demo

You can find the demo here. Open it with Firefox and scroll with the mouse inside the iframe

`

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
malihucommented, Nov 16, 2016

Because the browser handles its native scrollbar internally as an application. The custom scrollbar (like all custom scrollbars) is based on javascript (dragging it, using the mouse-wheel etc. are all based on javascript events) and javascript events are not allowed/triggered over iframes that host content that is on a different domain. This is a browser limitation which is there for security.

In short, the issue is that javascript events are not allowed over cross-domain iframes (it doesn’t matter if it’s a custom scrollbar or another plugin).

This happens only on cross-domain iframes. If you had an iframe that hosted a page from the same domain, e.g. another page on your site (like this example) everything would work.

1reaction
FDMatthiascommented, Oct 30, 2016

Can we re-open this? It seems to me this exact bug is now back, on Chrome and on Firefox (and also on mobile device)

Read more comments on GitHub >

github_iconTop Results From Across the Web

mouse wheel scrolling stops when mouse cursor is over a ...
Wait until mouse cursor is over the Youtube video 5. Try scrolling down now Actual Results: Scroll doesnt happen Expected Results: Scrolling should...
Read more >
Vimeo iFrame Stealing Mouse Wheel Event on Firefox
It may not work in every situation, but it should cover many cases. Instead of detecting wheel event , you detect scroll ,...
Read more >
[Fixed] Scroll not working in Mozilla® Firefox browser - YouTube
If you are looking for steps to troubleshoot the problem of scroll not working in Mozilla ® Firefox, you can follow the steps...
Read more >
Video Mouse Wheel :: Add-ons for Firefox
Use wheel mouse on videos to control video/audio/quality. Choose flash/HTML5 on YouTube, autopause on background tabs, embedded videos.
Read more >
[Solved] Youtube Not Working on Chrome - Driver Easy
Visit Chrome settings and uncheck “Use hardware acceleration when available”. This method has worked for many Chrome users who were having the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found