bxslider-4
bxslider-4 copied to clipboard
Stop slider swiping left/right when swiping up/down
Hi,
We're using your slider on a website and have been asked to stop it from moving left/right when the user gestures to scroll the page up/down on a mobile. This has come about when large sliders take up the majority of a mobile's screen meaning the user would need to scroll the page starting on a slider.
We tested this on iOS and can see what they are talking about. From looking at your slider options, we thought preventDefaultSwipeX
and preventDefaultSwipeY
could work for this but they aren't the right thing for us. When I set preventDefaultSwipeY
to true
then when I start swiping on your slider, it stops the page from scrolling (as we have not up/down action on the slider). Preventing X then would suggest that you can scroll the slider but not the page (which makes sense).
I can't seem to find anything to fit our needs from your options. The sort of thing we're after is like the slider on this page: http://www.rightmove.co.uk/property-for-sale/property-32751312.html where gesture up/down 'locks' gestures left/right.
Can you shed any light on this?
BUG: In addition to this, I did find that even if you have preventDefaultSwipeY
set to true
, you can long press and then still swipe up/down (which goes against what I believe the option does).
Regards,
Phil Bushnell
Is there a timescale for release 4.2.3. I have the same issue and my client is pushing for us to switch out the slider with a different one based on this problem. I'd rather tell them its getting fixed and we can get the fix to you by xx/yy/zzzz.
Our company is attending sxsw interactive but i hope to push several updates next week when we return.
Hi,
Is there any more news about if/when a fix for this may be in place? I'm now also being pushed for an answer to whether we need to implement a different slider or wait.
Regards,
Phil Bushnell
As you can see I am trying to run through the next update as quick as I can guys. Im currently the only active developer and I have a day job. I am hoping to knock out a bunch more and hopefully even finish today. Either way it should be soon.
I will push this up the list and see if I can't post a hotfix or something. Im open to PRs too if anyone has reviewed the code and crafted a solution.
After reviewing the code and options currently available, I've realized that you can get pretty much get this same effect by using the current options available. If you set oneToOneTouch
to false
and then toy with the swipeThreshold
until you get the type of reaction you want on the x-axis, it will help alleviate the issue of the slider changing slides when scrolling on the y-axis.
I am looking at improving the options in this area and making touch better. 4.2.0 saw many updates to this area, but I realize that it can be improved more. The above settings should get you to a better place in terms of your client needs for the moment though.
HTH
This is useful, thanks. Of course it removes the option to have it follow the finger which some people may care about but if you slide quick enough, you really don't notice. Thanks again.
Regards,
Phil Bushnell
Can confirm, this fixes the issue that I was also having. I think that an extra hint in the documentation (or an example) should be enough.
any update about this?
still majorly broken
Console log says:
[Intervention] Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
:(
Console log says:
[Intervention] Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
:(
Same. Was there ever a fix for this? I'm using bxSlider v4.2.12.