WordPress.org

Forums

Easy FancyBox
[resolved] Weird Scrolling Issue In iFrame (3 posts)

  1. BryanHauer
    Member
    Posted 3 years ago #

    Plugin works perfectly, but I'm noticing one issue. I have the plugin opening multiple iframes on a single page each using a separate link and when scrolling with a mouse in an iframe if I am at the top and scroll up instead of stopping it opens the iframe before that. Same happens at the bottom if I scroll down. It seems like it's acting like a gallery would where you could go back or forward to the previous or next photo, but instead is doing it within in iframe.

    To see what I mean go to http://www.wpthemestore.com/store/themes/ and click on any of the theme companies... StudioPress or whatever. Then using your scroller on a mouse scroll up or go to the very bottom and scroll down and you'll see what I mean.

    I looked in the settings and don't seem to see anything else I could change.

    Any help would be greatly appreciated.

  2. RavanH
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Bryan,

    This happens because the links all have the same rel attribute. In your case rel="bookmark" which causes FancyBox (not my plugin but the lightbox script itself) to think you want them grouped into one gallery.

    If you want to keep using the rel="bookmark" attribute, without too much interference of the fact that they all grouped into one gallery, you need to do two things:
    1. Uncheck the option 'Show the gallery navigation arrows' and
    2. Open the plugin file easy-fancybox/easy-fancybox.php in the WordPress plugin editor and find the line that starts with wp_enqueue_script('jquery.mousewheel', (not far from the bottom) and place // in front of it so it looks like:

    ...
    	// then register our version
    	//wp_enqueue_script('jquery.mousewheel', plugins_url(FANCYBOX_SUBDIR.'/fancybox/jquery.mousewheel-'.MOUSEWHEEL_VERSION.'.pack.js', __FILE__), array('jquery'), MOUSEWHEEL_VERSION, true);

    This way, at least the gallery navigation arrows will not show and the mousewheel action will not trigger scrolling through the gallery. However, the keyboard arrow keys will still control gallery scrolling...

    I'll include an option to remove the mousewheel script in the next version :)

  3. BryanHauer
    Member
    Posted 3 years ago #

    Ok. Thanks so much for your reply. I'll make the appropriate changes.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic