While scrolling over the iframe content area, the nice scroll didn't scroll (Firefox)
Closed this issue · 23 comments
What steps will reproduce the problem?
1.page needed with iframe without scroll
2. While scrolling over the iframe content area, the nice scroll(page scroll)
doesn't work
What is the expected output? What do you see instead?
While scrolling over the iframe content area, the page scroll need to work. It is working in chrome.
What version of the product are you using? On what operating system?
Firefox 17.0.1
Please provide any additional information below.
Original issue reported on code.google.com by gv.anant...@gmail.com
on 12 Dec 2012 at 5:52
iframe loads content from the same domain of main page?
Original comment by inuya...@gmail.com
on 13 Dec 2012 at 2:22
- Changed state: Accepted
Hi,
Same host but different port.(e.g) http://localhost:8080 content from
http://localhost:9090
Original comment by gv.anant...@gmail.com
on 17 Dec 2012 at 6:40
In this situation, you need to add nicescroll to page loaded by iframe.
Javascript policy not permit to nicescroll to control the content.
Original comment by inuya...@gmail.com
on 17 Dec 2012 at 8:34
Original comment by inuya...@gmail.com
on 17 Dec 2012 at 8:34
- Added labels: Type-Other
- Removed labels: Type-Defect
Hi,
It works fine in chrome.
Original comment by gv.anant...@gmail.com
on 17 Dec 2012 at 8:57
How is it working in chrome?
Original comment by gv.anant...@gmail.com
on 18 Dec 2012 at 10:50
Chrome works weird because it triggers mousewheel events as iframe is a local
div.
Other browsers respect policy restriction and not trigger events.
Original comment by inuya...@gmail.com
on 18 Dec 2012 at 8:48
Is there any work around available to trigger the mousewheel events for firefox?
Original comment by gv.anant...@gmail.com
on 19 Dec 2012 at 7:12
For a more specific solution I need to watch your pages.
I suggest you to init nicescroll from iframe content (9090) instead from the
main page (8080)
Original comment by inuya...@gmail.com
on 19 Dec 2012 at 8:27
Hi,
I have attached test pages.Try this page in firefox.
I don't need any scroll inside iframe, because I have extend the iframe height
corresponding to iframe content. My requirement is while mousewheel on the
iframe content ,it need to call the page scroll.It works without
nicescroll(normal page scroll)
Original comment by gv.anant...@gmail.com
on 26 Dec 2012 at 1:35
Attachments:
Thanks for the code.
The problem is a browser limitation. When you scroll over an iframe, all events
are manage from iframe itself, the page doesn't receive mousewheel events.
The simple solution for Firefox can be events prevents on iframe, so page can
manage it.
You can use this:
$("#_iframe_view").css({"pointer-events":"none"});
It prevents click events too, so you need replicate click from page to iframe
(re-trigging event)
Original comment by inuya...@gmail.com
on 26 Dec 2012 at 4:37
Hi,
Thanks for your response,
I can't prevents the event because The page is not static. It will have many
links and buttons,It will not work after prevent event.
I thing it is an issue in nice scroll, Because while removing the nice scroll
init , It will work.
Original comment by gv.anant...@gmail.com
on 26 Dec 2012 at 6:37
Sorry, it's a limit of javascript.
You can try to retrigger mousewheel events from iframe to main page with a
specific script (runned on iframe scope).
Original comment by inuya...@gmail.com
on 26 Dec 2012 at 10:09
Original comment by inuya...@gmail.com
on 3 Apr 2013 at 7:55
- Changed state: Done
i too have same problem give an solution for this
Original comment by anandrag...@gmail.com
on 19 Jul 2013 at 5:34
No easy solution.
Iframes on firefox trap all mouse events so nicescroll (on main page) can't
detect mouse wheel events.
It's easier to directly add nicescroll to content loaded from iframe. (if you
can)
Original comment by toso...@tiscali.it
on 22 Jul 2013 at 8:25
Hi, same problem here, I embed a video from vimeo. I can't disable
pointer-events, while than I can't use the player's buttons. Any good ideas?
Original comment by zoltan.s...@gmail.com
on 18 Nov 2013 at 11:29
This issue should be fixed.
Original comment by raselahm...@gmail.com
on 1 Mar 2014 at 12:44
I still can't seem to get this working on firefox. Whatever I do it just
doesn't react on a mousewheel event when the pointer is over an iframe. I'm
trying to get this to work with a horizontal scroll event. Chrome is fine.
Original comment by studiobo...@gmail.com
on 24 Mar 2014 at 10:19
I could just manage to overcome this problem. You can check the solution
mentioned in the jsfiddle mentioned below.
http://jsfiddle.net/6nnMV/358/
Here, I have created a event to listen to the mouse scroll and have binded the
event to the iframe.
You can then scroll the parent window or element by using the scrollTop
property like
$(element).scrollTop($(element).scrollTop+(number of pixels));
This will only work when the iframe you are accessing is in the same domain.
Original comment by sandeeps...@gmail.com
on 11 Apr 2014 at 7:51
Can somebody confirm that this works?
I have the exact same issue:
- A page with an iFrame.
- The iFrame's height is always adapted to the length of its content, thus no
scrolling.
When I scroll using the mouse wheel hovering over the iFrame scrolling stops
half way of the iFrame.
When not using niceScroll everything is working as expected.
Original comment by Jeeo...@gmail.com
on 2 Sep 2014 at 3:39
I am also getting same problem. did anyone solve it?
Original comment by atikrahm...@gmail.com
on 20 Nov 2014 at 4:27
So far any solution for this scroll problem in Iframe?
Original comment by gurvinde...@gmail.com
on 14 May 2015 at 6:58