Skip to content

Commit

Permalink
fix: scrolling on mobile broken because of passive events
Browse files Browse the repository at this point in the history
  • Loading branch information
Jexordexan committed Feb 16, 2021
1 parent 6a5617d commit 37630b2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/ContainerMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ export const ContainerMixin = {

for (const key in this.events) {
if (this.events.hasOwnProperty(key)) {
events[key].forEach((eventName) =>
this.container.addEventListener(eventName, this.events[key], { passive: true })
);
events[key].forEach((eventName) => this.container.addEventListener(eventName, this.events[key]));
}
}

Expand Down Expand Up @@ -265,8 +263,8 @@ export const ContainerMixin = {
}

this.listenerNode = e.touches ? node : this._window;
events.move.forEach((eventName) => this.listenerNode.addEventListener(eventName, this.handleSortMove, false));
events.end.forEach((eventName) => this.listenerNode.addEventListener(eventName, this.handleSortEnd, false));
events.move.forEach((eventName) => this.listenerNode.addEventListener(eventName, this.handleSortMove));
events.end.forEach((eventName) => this.listenerNode.addEventListener(eventName, this.handleSortEnd));

this.sorting = true;

Expand Down Expand Up @@ -517,7 +515,7 @@ export const ContainerMixin = {
};
// Force cleanup in case 'transitionend' never fires
const cleanupTimer = setTimeout(cleanup, duration + 10);
this.helper.addEventListener('transitionend', cleanup, false);
this.helper.addEventListener('transitionend', cleanup);
},

updatePosition(e) {
Expand Down

0 comments on commit 37630b2

Please sign in to comment.