Skip to content

Commit

Permalink
fix(swipe): Remove passive attribute from swiping events (#248, #245)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedrzejchalubek committed Aug 2, 2018
1 parent 4a2b3f6 commit 3e91f1e
Showing 1 changed file with 12 additions and 30 deletions.
42 changes: 12 additions & 30 deletions src/components/swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,15 @@ export default function (Glide, Components, Events) {
let settings = Glide.settings

if (settings.swipeThreshold) {
Binder.on(
START_EVENTS[0],
Components.Html.wrapper,
(event) => {
this.start(event)
},
{ passive: true }
)
Binder.on(START_EVENTS[0], Components.Html.wrapper, (event) => {
this.start(event)
})
}

if (settings.dragThreshold) {
Binder.on(
START_EVENTS[1],
Components.Html.wrapper,
(event) => {
this.start(event)
}
)
Binder.on(START_EVENTS[1], Components.Html.wrapper, (event) => {
this.start(event)
})
}
},

Expand All @@ -192,14 +183,9 @@ export default function (Glide, Components, Events) {
* @return {Void}
*/
bindSwipeMove () {
Binder.on(
MOVE_EVENTS,
Components.Html.wrapper,
throttle((event) => {
this.move(event)
}, Glide.settings.throttle),
{ passive: true }
)
Binder.on(MOVE_EVENTS, Components.Html.wrapper, throttle((event) => {
this.move(event)
}, Glide.settings.throttle))
},

/**
Expand All @@ -217,13 +203,9 @@ export default function (Glide, Components, Events) {
* @return {Void}
*/
bindSwipeEnd () {
Binder.on(
END_EVENTS,
Components.Html.wrapper,
(event) => {
this.end(event)
}
)
Binder.on(END_EVENTS, Components.Html.wrapper, (event) => {
this.end(event)
})
},

/**
Expand Down

0 comments on commit 3e91f1e

Please sign in to comment.