imagelightbox icon indicating copy to clipboard operation
imagelightbox copied to clipboard

Mouse click on touchscreen laptop broken

Open F22-Raptor-2006 opened this issue 9 years ago • 15 comments

With the default settings the lightbox opens fine on desktop and you can navigate by clicking on the left and right of the image or close by clicking outside the image. However on my laptop which has a touchscreen (perhaps the reason) it opens fine but then does not respond to any mouse input. I must use the touchscreen to get any response from it.

F22-Raptor-2006 avatar Sep 06 '16 10:09 F22-Raptor-2006

Hi, what browser/os are you using on your laptop? does the browser console show anything? and on the demo page, do all demos show this bug?

rejas avatar Sep 06 '16 11:09 rejas

Hi I'm using Chrome Version 53.0.2785.89 m on Win 10 x64, this happens with nearly all of the demos on the demo page here too: https://rejas.github.io/imagelightbox/ Only the close demo and other demos with the X button or on screen navigation allow me to navigate/close. Otherwise I cannot close or change the picture once open.

The console only shows warnings for Mixed Content: The page at 'https://rejas.github.io/imagelightbox/' was loaded over HTTPS, but requested an insecure image 'http://osvaldas.info/examples/image-lightbox-responsive-touch-friendly/full/2.jpg'. This content should also be served over HTTPS.

F22-Raptor-2006 avatar Sep 06 '16 12:09 F22-Raptor-2006

I got my hands on a touch/click device and can confirm your bug report. Will take a look at it (probably due to a faulty if touch clause...

rejas avatar Sep 09 '16 08:09 rejas

Great thanks!

F22-Raptor-2006 avatar Sep 09 '16 10:09 F22-Raptor-2006

Created a branch for this issue and did some work. Could you check that out and see if the demos work now better for you?

rejas avatar Sep 12 '16 09:09 rejas

Sorry it doesn't seem to be working, getting some errors in the console as well:

jQuery.Deferred exception: t.on is not a function TypeError: t.on is not a function at d (http://cdn.rawgit.com/rejas/imagelightbox/issue_47/dist/imagelightbox.min.js:1:692) at HTMLDocument.<anonymous> (http://cdn.rawgit.com/rejas/imagelightbox/issue_47/dist/imagelightbox.min.js:1:6367) at j (http://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js:2:29568) at k (http://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js:2:29882) undefined

jquery.min.js:2 Uncaught TypeError: t.on is not a function

F22-Raptor-2006 avatar Sep 12 '16 18:09 F22-Raptor-2006

Yeah, my fault :-( Anyway, I added some fixes, could you retry one more time? Much appreciated...

rejas avatar Sep 13 '16 21:09 rejas

Sorry I've been meaning to test it but I keep forgetting. Just had a go today and there are no errors now. I can now close the lightbox by clicking anywhere outside of the picture. However the functionality for going to the previous or next picture by clicking on the left or right sides of the picture doesn't work. Swiping left and right on the touchscreen does but not the click. (this should be the most basic demo)

F22-Raptor-2006 avatar Sep 19 '16 13:09 F22-Raptor-2006

hi @F22-Raptor-2006, could you test the latest version 0.7.2 if that problem still persists?

rejas avatar Feb 16 '17 09:02 rejas

@rejas I tried to used version 0.7.2, but it isn't published on npmjs.org, see $ npm view imagelightbox

Art4 avatar Sep 07 '17 21:09 Art4

Will do once I am back from holidays in 10 days and have my PC in front of me again :-) THX for your patience in advance

rejas avatar Sep 08 '17 16:09 rejas

@Art4 could you try one of the newer versions? 0.7.7 should have the fix for it too and its published on npm...

rejas avatar Sep 17 '17 07:09 rejas

I don't have a touchscreen laptop, but a user of my site reported this bug with v0.5.4.

I've already tried v0.7.2 out with the github url in the package.json, but I could not deploy it to our site because of the missing deep linkage I described in #37.

Art4 avatar Sep 17 '17 11:09 Art4

Hopefully 0.7.8 can now be deployed at your site to check the original bug out :-)

rejas avatar Sep 17 '17 15:09 rejas

Great! :tada: I will update as far as I can and will report the feedback.

Art4 avatar Sep 17 '17 15:09 Art4