浏览代码

Reverted incomplete fix about bug where opening card scrolls to wrong place.

Thanks to danceb, DimDz, mfilser, Emile840, derbolle, xplodwild and xet7 !

Fixes #4572
Lauri Ojansivu 2 年之前
父节点
当前提交
6594795f39
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      client/components/cards/cardDetails.js

+ 12 - 0
client/components/cards/cardDetails.js

@@ -86,17 +86,29 @@ BlazeComponent.extendComponent({
   scrollParentContainer() {
   scrollParentContainer() {
     const cardPanelWidth = 600;
     const cardPanelWidth = 600;
     const parentComponent = this.parentComponent();
     const parentComponent = this.parentComponent();
+
+/*
+    // Incomplete fix about bug where opening card scrolls to wrong place
+    // https://github.com/wekan/wekan/issues/4572#issuecomment-1184149395
     // TODO sometimes parentComponent is not available, maybe because it's not
     // TODO sometimes parentComponent is not available, maybe because it's not
     // yet created?!
     // yet created?!
     if (!parentComponent) return;
     if (!parentComponent) return;
     const bodyBoardComponent = parentComponent.parentComponent();
     const bodyBoardComponent = parentComponent.parentComponent();
+*/
+
     //On Mobile View Parent is Board, Not Board Body. I cant see how this funciton should work then.
     //On Mobile View Parent is Board, Not Board Body. I cant see how this funciton should work then.
     if (bodyBoardComponent === null) return;
     if (bodyBoardComponent === null) return;
     const $cardView = this.$(this.firstNode());
     const $cardView = this.$(this.firstNode());
     const $cardContainer = bodyBoardComponent.$('.js-swimlanes');
     const $cardContainer = bodyBoardComponent.$('.js-swimlanes');
+
+/*
+    // Incomplete fix about bug where opening card scrolls to wrong place
+    // https://github.com/wekan/wekan/issues/4572#issuecomment-1184149395
     // TODO sometimes cardContainer is not available, maybe because it's not yet
     // TODO sometimes cardContainer is not available, maybe because it's not yet
     // created?!
     // created?!
     if (!$cardContainer) return;
     if (!$cardContainer) return;
+*/
+
     const cardContainerScroll = $cardContainer.scrollLeft();
     const cardContainerScroll = $cardContainer.scrollLeft();
     const cardContainerWidth = $cardContainer.width();
     const cardContainerWidth = $cardContainer.width();