2
0
Эх сурвалжийг харах

Fix dragscroll getting stuck on view changes

Nadav Tasher 5 сар өмнө
parent
commit
30a2e8b990

+ 3 - 0
client/components/boards/boardBody.js

@@ -195,6 +195,9 @@ BlazeComponent.extendComponent({
     });
 
     this.autorun(() => {
+      // Always reset dragscroll on view switch
+      dragscroll.reset();
+
       if (Utils.isTouchScreenOrShowDesktopDragHandles()) {
         $swimlanesDom.sortable({
           handle: '.js-swimlane-header-handle',

+ 2 - 0
client/components/boards/boardHeader.js

@@ -1,5 +1,6 @@
 import { ReactiveCache } from '/imports/reactiveCache';
 import { TAPi18n } from '/imports/i18n';
+import dragscroll from '@wekanteam/dragscroll';
 
 /*
 const DOWNCLS = 'fa-sort-down';
@@ -78,6 +79,7 @@ BlazeComponent.extendComponent({
           ReactiveCache.getCurrentUser().toggleBoardStar(Session.get('currentBoard'));
         },
         'click .js-auto-width-board'() {
+          dragscroll.reset();
           ReactiveCache.getCurrentUser().toggleAutoWidth(Utils.getCurrentBoardId());
         },
         'click .js-open-board-menu': Popup.open('boardMenu'),