vvvmax / unitegallery

Unite Gallery - Responsive jQuery Image and Video Gallery Plugin. Aim to be the best gallery on the web on it's kind. See demo here:
http://unitegallery.net
MIT License
531 stars 158 forks source link

Fullscreen not working on mouse click (Chrome & Firefox), but touch emulation works #139

Open dharders opened 7 years ago

dharders commented 7 years ago

Version: 1.7.45, released 27 Feb 2017

Issue:

When clicking the fullscreen icon with a mouse, nothing happens in either Chrome (57.0.2987.133, Win7 64-bit) or Firefox (52.0.2). It works in IE 11 (& 10,9,8 etc) and also all the other devices I tested (iOS 10, Android 6 etc).

The odd thing is that it works in Chrome and Firefox if I enable touch emulation in developer tools, so it seems that there may be a an issue with mouse events, as the touch events seem to work.

I am using the compact theme if that helps.

This issue is somewhat related to #135 but it looks like the changes made in the 1.7.45 release weren't applied to mouse events or accidentally broke it.

Here is my setup if it helps:

    var api;
    $(document).ready(function () {

      api = $("#gallery").unitegallery({ 
        gallery_theme: "compact",
        gallery_height: 600, 
        slider_enable_zoom_panel: false,
        slider_enable_fullscreen_button: true,
        slider_controls_always_on: true,
        gallery_pause_on_mouseover: false,
        theme_hide_panel_under_width: null,
        theme_panel_position: "bottom",
        gallery_images_preload_type: "all",
        slider_scale_mode: "fit",
      });
   });

P.S. Awesome plugin, saved me many hours!

DrAndri commented 7 years ago

I'm having this issue as well I updated from 1.7.40 to 1.7.45 since fullscreen wasn't working with touch. After the update fullscreen works with touch but stopped working with clicks on chrome desktop (v. 58.0.3029.110).

Thank you for making an awesome image gallery! By far the best out there...

DrAndri commented 7 years ago

Ok, so the problem for me was that my laptop is touch enabled and therefore only the touch handler got registered.

My solution is to always register the click handler regardless of the device being a touch device. I'll submit a PR today/tomorrow if it's working :)