From adcc33ed7fe686d46a85da6c11ea448d29e94ca7 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 23 May 2022 00:50:21 +0300 Subject: [PATCH] Fix opening card scrolls to wrong position when many swimlanes and card at bottom of board. Thanks to xet7 ! --- client/components/cards/cardDetails.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index f8350a1c0..401f4c6ef 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -212,11 +212,6 @@ BlazeComponent.extendComponent({ //------------- } - if (!Utils.isMiniScreen()) { - Meteor.setTimeout(() => { - this.scrollParentContainer(); - }, 500); - } const $checklistsDom = this.$('.card-checklist-items'); $checklistsDom.sortable({ @@ -440,10 +435,20 @@ BlazeComponent.extendComponent({ 'click .js-maximize-card-details'() { Meteor.call('toggleCardMaximized'); autosize($('.card-details')); + if (!Utils.isMiniScreen()) { + Meteor.setTimeout(() => { + this.scrollParentContainer(); + }, 500); + } }, 'click .js-minimize-card-details'() { Meteor.call('toggleCardMaximized'); autosize($('.card-details')); + if (!Utils.isMiniScreen()) { + Meteor.setTimeout(() => { + this.scrollParentContainer(); + }, 500); + } }, 'click .js-vote'(e) { const forIt = $(e.target).hasClass('js-vote-positive');