From c8da5c7356029c36219786baec8cf8ebe41aba6b Mon Sep 17 00:00:00 2001 From: Dmitry S Date: Thu, 14 Oct 2021 00:06:02 -0400 Subject: [PATCH] (core) Fix Card view linked to summary to show card navigation buttons Test Plan: Added a test case to verify that nav buttons are now shown and work. Reviewers: alexmojaki Reviewed By: alexmojaki Differential Revision: https://phab.getgrist.com/D3073 --- app/client/components/DetailView.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/client/components/DetailView.js b/app/client/components/DetailView.js index cfcc923c..402b65ad 100644 --- a/app/client/components/DetailView.js +++ b/app/client/components/DetailView.js @@ -318,11 +318,11 @@ DetailView.prototype.buildTitleControls = function() { // Hide controls if this is a card list section, or if the section has a scroll cursor link, since // the controls can be confusing in this case. // Note that the controls should still be visible with a filter link. - const showControls = ko.computed(() => - this._isSingle && - (!this.viewSection.activeLinkSrcSectionRef() || this.viewSection.activeLinkTargetColRef()) && - !this.recordLayout.layoutEditor() - ); + const showControls = ko.computed(() => { + if (!this._isSingle || this.recordLayout.layoutEditor()) { return false; } + const linkingState = this._linkingState(); + return !(linkingState && Boolean(linkingState.cursorPos)); + }); return dom('div', dom.autoDispose(showControls),