Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iframe inside with content fixed height not getting scrolled using mouse wheel #651

Open
andrewjoypappu opened this issue Feb 13, 2017 · 8 comments

Comments

@andrewjoypappu
Copy link

andrewjoypappu commented Feb 13, 2017

referring to:

This is a weird bug but all custom scroll plugins like nicescroll , perfectscrollbar , or even jScrollPane have the same issue , whenever an iframe is embedded with the container to be scrolled , the iframe never listens to mouse wheel event neither touch swipe events ( to scroll on mobile devices ) , searched everywhere to find a solution seems that people have submitted issues on plugins pages , but no one realised that it is a universal bug not a bug from the plugin itself.
http://stackoverflow.com/questions/27912728/firefox-iframe-custom-scroll-bug

@andrewjoypappu andrewjoypappu changed the title iframe with full content fixed height inside not getting scrolled using mouse wheel iframe inside with content fixed height not getting scrolled using mouse wheel Feb 13, 2017
@Jeeosch
Copy link

Jeeosch commented Mar 17, 2017

+1 since I really find this annoying.

@inuyaksa
Copy link
Owner

Related to #322 fixed with the new iframehelper script (in dist folder)

@sonans202
Copy link

Hi Inuyaksa, thanks for the nice plugin! But It's not working for me when trying to iframe cross origin domain, im using jquery.nicescroll.iframehelper.js, showing this error in chrome:


Uncaught DOMException: Blocked a frame with origin "" from accessing a cross-origin frame. at HTMLBodyElement.onwheel() onwheel @ jquery.nicescroll.iframehelper.js:33


Is it solved? Because for Jeeosch case were within the same domain. Thanks~

@inuyaksa
Copy link
Owner

Hi, with content from other domains is a problem to resolve this issue.
Do you have an example I could check?

@sonans202
Copy link

sonans202 commented Jul 20, 2017

Thanks for the reply! Here is my testing site and code:

This is the page using iframe:
http://xidelang.listedcompany.com/test.rev

You can try to mouse hover and scroll the iframe content, the parent window won't scroll but the scroll work just fine when mouse hover outside the iframed content.

This is the content of the iframe using jquery.nicescroll.iframehelper.js:
http://samplemynew.listedcompany.com/includes/integration_external_news_summary.html

@alana314
Copy link

Also having this with a youtube embed.

@inuyaksa
Copy link
Owner

inuyaksa commented Aug 2, 2017

Youtube use iframes, then wheel events has stealed from iframe undetectable from javascript on page.
Old but actual similar issue:
https://stackoverflow.com/questions/31418920/vimeo-iframe-stealing-mouse-wheel-event-on-firefox

@ccrstudio
Copy link

ccrstudio commented Jul 2, 2020

sonans202 Let me give you a try to fix it: insted of using iframe use div:

<style> div.scroll { overflow-y: auto; } div class="scroll" > div class="content" > print the html code´s other page here. I use php |include|. there are many ways /div>/div> It helps my using other page´s content along nicescroll In web chrome: OK!! In mobile chrome: OK!! But when
has overflow bar, due to div class="content" > overflows div class="scroll" >´s max-height, it changes: In web chrome: OK!! In mobile chrome: :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants