Skip to content

Conversation

@ianwesty
Copy link

@ianwesty ianwesty commented Feb 14, 2019

On Android, tap on an image in the carousel.
Next and previous icons are highlighted but images cannot move by drag or via next/previous links.

@ianwesty ianwesty changed the title Carousel getting stuck on android devices on tap [Android] Touch problem Feb 14, 2019
// watch only for left mouse, touch contact and pen contact
// touchstart event object doesn`t have button property
if (e.type !== 'touchstart' && e.button !== 0) {
if ((e.type !== 'touchstart' || e.type !== 'pointerdown') && e.button !== 0) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't make any sense.
Your proposed (e.type !== 'touchstart' || e.type !== 'pointerdown') could also be written as !(e.type === 'touchstart' && e.type === 'pointerdown'). As you probably can see now, this would always be true,...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants