bxslider-4 icon indicating copy to clipboard operation
bxslider-4 copied to clipboard

Stop slider swiping left/right when swiping up/down

Open ghost opened this issue 9 years ago • 11 comments

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

ghost avatar Mar 05 '15 17:03 ghost

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.

chrisp68 avatar Mar 20 '15 14:03 chrisp68

Our company is attending sxsw interactive but i hope to push several updates next week when we return.

Tidal-Wave avatar Mar 21 '15 00:03 Tidal-Wave

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

ghost avatar Mar 27 '15 09:03 ghost

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. screen shot 2015-03-27 at 9 05 52 am

Tidal-Wave avatar Mar 27 '15 14:03 Tidal-Wave

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

Tidal-Wave avatar Mar 27 '15 15:03 Tidal-Wave

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

ghost avatar Mar 30 '15 16:03 ghost

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.

borys-p avatar Mar 23 '16 21:03 borys-p

any update about this?

thallysondias avatar Jan 30 '18 19:01 thallysondias

still majorly broken

zenotds avatar Apr 11 '18 13:04 zenotds

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.

:(

andreymokko avatar Jan 23 '19 14:01 andreymokko

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.

jayllellis avatar Feb 15 '19 03:02 jayllellis