Skip to content

Commit

Permalink
fix: closing bottomsheet multiple hook triggering [MDS-1369] (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffcabbar authored Nov 12, 2024
1 parent 0326c90 commit 05614ed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions assets/js/hooks/bottom_sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default {
},

setupSwipePanel() {

if (this.swipePanelInitialized) return;
const startPosition = {
x: 0,
y: 0
Expand All @@ -51,7 +51,7 @@ export default {

addEvent(document.body, "touchstart", event => {
const touch = event.targetTouches[0];
if ((this.el.dataset.is_open !== undefined)) {
if (this.el.dataset.is_open !== undefined) {
startPosition.x = touch.pageX;
startPosition.y = touch.pageY;
panelHeight = this.panel.offsetHeight;
Expand Down Expand Up @@ -88,5 +88,6 @@ export default {
startedSwipe = false;
}
});
},
this.swipePanelInitialized = true;
}
};

0 comments on commit 05614ed

Please sign in to comment.