This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Pages: 1 - Last Post: 19-Feb-2020 13:01 Last Post By: JeffTucker Threads: [ Previous | Next ]
ksmatharu

Posts: 62
Registered: 2-May-2009
Jupiter - tapping and swiping on touch enabled devices
Posted: 16-Feb-2020 08:44
 
  Click to reply to this thread Reply
Using Jupiter skin. A couple of items in order or importance, at least to me :)

Firstly, on my Surface Pro and on my iPad, I can (touch) tap on the left or right halves of an image to navigate to the previous or next slide. But on my iPad and iPhone, although touch swiping works, tapping doesn't work on the iPhone. Is there a setting for this, for example for small screens, or is this a designed behaviour?

Secondly, the swiping action (on iPad or iPhone) does not behave provide any user interaction that swiping is "in play" so to speak. You just swipe and hope that something happens. On Tiger, for example, swiping moves the image under your action so you get some feedback that swiping will do something. Any plans to provide some kind of swiping feedback in Jupiter?

Finally, on Surface Pro, swiping does not work in any browser I tested (Chrome, Edge, Firefox). Not that important as tapping works and so does mouse interaction of course.

I suspect, because there are so many device/browser combinations, that catering for them all is a developer's headache!

Album is at https://www.silentnomad.com/images/
JeffTucker

Posts: 6,979
Registered: 31-Jan-2006
Re: Jupiter - tapping and swiping on touch enabled devices
Posted: 16-Feb-2020 14:21   in response to: ksmatharu in response to: ksmatharu
 
  Click to reply to this thread Reply
ksmatharu wrote:
Using Jupiter skin....

There's the problem. If you're looking for fancy touch-device behavior, you've chosen the wrong skin.

Jupiter and Mercury are both "slide page" skins, in which each large image is shown on a separate slide page. This in inherently unfriendly for swiping. That's the realm of the "lightbox" skins - Mars, Neptune, Pluto, Saturn.

I added very basic swipe functionality to Jupiter just so that phone users wouldn't be completely lost. I've seen my little grandnephews attack a phone, and they instantly start swiping left and right. It's all they know. I don't think they'd know how to use a mouse at all.

There is no animation, and I don't have any plans to add any. Lots of effort for a very small payoff. The script I use in the lightbox skins has that built-in, so if that's important to you, use one of those skins.

The "tap on right or left" gets turned off on any device that measures less than 500px in either dimension - i.e., a phone. It's not doing any sort of device detection - even if you shrink your browser window below those dimensions, the tap areas are disabled.

Others have complained about the touch behavior of the Surface Pro. I've never even seen one, so I can't really comment.
ksmatharu

Posts: 62
Registered: 2-May-2009
Re: Jupiter - tapping and swiping on touch enabled devices
Posted: 17-Feb-2020 06:24   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Thanks. Why disable tapping on small screens? On my iPhone, it would be great if I could just tap on the image as that seems far more natural than the non-interactive swipe action.
JeffTucker

Posts: 6,979
Registered: 31-Jan-2006
Re: Jupiter - tapping and swiping on touch enabled devices
Posted: 17-Feb-2020 14:44   in response to: ksmatharu in response to: ksmatharu
 
  Click to reply to this thread Reply
Remember, it's not "click for next." It's "click on the right for next, click on the left for previous." If that's still enabled on a phone, you get an interesting problem. If the user swipes to the left, intending to go to the next image, but doesn't do the swipe in exactly the right way, it would get interpreted as a click on the left, taking him to the previous image. To the user, it would seem like a navigation error.

The third-party script that I use in most of my lightbox skins does exactly the same thing, and I believe for the same reason. In fact, I don't think it's possible to override it in the settings for that script - the interference between swipes and on-image navigation is that bad.
ksmatharu

Posts: 62
Registered: 2-May-2009
Re: Jupiter - tapping and swiping on touch enabled devices
Posted: 19-Feb-2020 06:57   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Thanks for that explanation. I'm sure the script author knows better than me but I wish there was an option to overide. I'd rather have swipe disabled and keep tapping if it was that bad! Thanks again for the explanation.
JeffTucker

Posts: 6,979
Registered: 31-Jan-2006
Re: Jupiter - tapping and swiping on touch enabled devices
Posted: 19-Feb-2020 13:01   in response to: ksmatharu in response to: ksmatharu
 
  Click to reply to this thread Reply
ksmatharu wrote:
I'm sure the script author knows better than me...

Two script authors, each of whom independently encountered the same problem, and arrived at the same solution.

I'd rather have swipe disabled and keep tapping....

There's the problem in the way you're thinking about this - keep tapping. If a site visitor started viewing the album on a desktop, and then quickly switched to a phone, he might be thrown by the change. But who's doing that? A phone visitor is a phone visitor, and watch phone users sometime - they instinctively start swiping. They're very puzzled if it doesn't work.

In any event, you can easily hack the skin to make it "all clicks, no swipes" by deleting just three lines of code:
In slide.htt, lines 20-21:
 
<ja:if not test="<%=isYoutube || isVimeo || isVideo%>"><script src='${resPath}/jquery.touchSwipe.min.js'></script>
<script src='${resPath}/juswipe.js'></script></ja:if>
 
In resopt/juslide.js, line 11:
 
$('.ju-prev, .ju-next').css({'display': 'none'});
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums