glide icon indicating copy to clipboard operation
glide copied to clipboard

Skip next Slide when Click arrow button on Mobile IOS 14

Open phanthelam opened this issue 4 years ago • 4 comments

I'm facing strange problems in Mobile view. it always moves 2 slides or skips the next element when clicking the arrow button. But it just happened on the mobile and works normally on the Desktop view.

https://user-images.githubusercontent.com/60104226/114281187-218b0500-9a67-11eb-99a1-593d1dfb062d.MP4

phanthelam avatar Apr 10 '21 19:04 phanthelam

Hi @phanthelam , I had same issue with Iphone, fix for IOS 14 for me was to change <div data-glide-el="controls"> <div data-glide-dir="<"> </div> <div data-glide-dir=">"> </div> </div> to <div data-glide-el="controls"> <button data-glide-dir="<"> </button> <button data-glide-dir=">"> </button> </div>

So the arrows element has to be button.

pararell avatar Apr 26 '21 07:04 pararell

Thanks @pararell . This issue is still there as of 1/26/23.

aaroncrawford avatar Jan 27 '23 01:01 aaroncrawford

I faced the same bug, which seems to be related to iOS triggering both click and touchstart event.

Commenting out the line which binds the touchstart event fixed the problem for me:

bind (elements) {
  for (let i = 0; i < elements.length; i++) {
    Binder.on('click', elements[i], this.click)
    // Binder.on('touchstart', elements[i], this.click, capture)
  }
},

xfra35 avatar Feb 06 '24 11:02 xfra35