-
Notifications
You must be signed in to change notification settings - Fork 663
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
If there's any clickable image behind the X, it loads the image instead of closing #365
Comments
+1 it's reloading the whole page in my case because of a link behind the close button (on mobile only). Users can't always figure out the swipe up/down when no X is shown, so they ends up clicking reload or back instead. |
Workaround, change closeSlide to (add event.preventDefault):
|
Hi, I 'am getting this error in Chrome after I changed closeSlide: "[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive." How can I fix this? Thanks. |
Having the same issue. The code above works, but gives an error in the console after closing: "Unable to preventDefault inside passive event listener due to target being treated as passive." |
+1, I'm having the same issue with mobile browsers. I have a large gallery, and the X simply doesn't work if there's a clickable link behind it, leading to being unable to exit the gallery without reloading the page. [edit] I thought maybe I could make an ugly hack to get around this by disabling SVGs, and replacing the transparent PNGs with JPGs, in case the click event wasn't being "seen" by the pixels, but this doesn't work, either. The code above doesn't work for me, either. [edit 2] Actually, everything goes "through" the opened image, to the page below, including scrolling, which makes this extremely unusable on mobile Safari. (Probably other browsers, too, but I haven't tested those. [edit 3] This code that I found works: #331 (comment) |
if at https://github.com/brutaldesign/swipebox/blob/master/src/js/jquery.swipebox.js (Swipebox v1.4.4) line 587
you change the code to
this prevent to propagate the touch event to another underlying swipebox element on mobile device and consequently reopen the slideshow |
Anytime there's a clickable image behind the X, it loads the image tapped behind the X instead of exiting Swipebox.
Mostly a big problem with galleries. Makes it very difficult for user to exit. Yes, they could swipe up, but the glaring X is invariably what they'll be trying.
Would love to see this solved.
The text was updated successfully, but these errors were encountered: