From f5f719997896aa100e538380f35591fbf548c427 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 26 Oct 2021 16:41:51 +0300 Subject: [PATCH 1/2] [SSE] Bug 52232 --- apps/common/main/lib/component/TabBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/TabBar.js b/apps/common/main/lib/component/TabBar.js index 386c4c6bc..f5bb947e1 100644 --- a/apps/common/main/lib/component/TabBar.js +++ b/apps/common/main/lib/component/TabBar.js @@ -177,7 +177,7 @@ define([ lockDrag = true; } }); - if (this.bar.selectTabs.length === this.bar.tabs.length || this.bar.tabs.length === 1 || this.bar.isEditFormula) { + if (((this.bar.selectTabs.length === this.bar.tabs.length || this.bar.tabs.length === 1) && !(e.ctrlKey || e.metaKey)) || this.bar.isEditFormula) { lockDrag = true; } this.bar.$el.find('ul > li > span').attr('draggable', !lockDrag); From b225d5e196348365bded311b8766e6bdd5e88def Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 26 Oct 2021 18:09:13 +0300 Subject: [PATCH 2/2] [SSE] Bug 52232 --- apps/common/main/lib/component/TabBar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/common/main/lib/component/TabBar.js b/apps/common/main/lib/component/TabBar.js index f5bb947e1..9a31acd0d 100644 --- a/apps/common/main/lib/component/TabBar.js +++ b/apps/common/main/lib/component/TabBar.js @@ -180,6 +180,11 @@ define([ if (((this.bar.selectTabs.length === this.bar.tabs.length || this.bar.tabs.length === 1) && !(e.ctrlKey || e.metaKey)) || this.bar.isEditFormula) { lockDrag = true; } + // move last selected sheet if all sheets are selected + if (this.bar.selectTabs.length === this.bar.tabs.length && this.bar.tabs.length > 1 && !e.ctrlKey && !e.metaKey) { + lockDrag = false; + this.bar.$el.find('ul > li.selected').removeClass('selected'); + } this.bar.$el.find('ul > li > span').attr('draggable', !lockDrag); if (!lockDrag && !e.ctrlKey && !e.metaKey) { tab.changeState();