From 1d30285d7e0b1dcda30816a653c8fe756ffd44ce Mon Sep 17 00:00:00 2001 From: PhilReact Date: Fri, 29 Sep 2023 00:46:13 -0500 Subject: [PATCH] fix remove tab click event --- core/src/components/show-plugin.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/components/show-plugin.js b/core/src/components/show-plugin.js index f46896c2..6b6649bb 100644 --- a/core/src/components/show-plugin.js +++ b/core/src/components/show-plugin.js @@ -441,10 +441,13 @@ class ShowPlugin extends connect(store)(LitElement) { ${count ? html` ${title} ${count} - {this.removeTab(index, tab.id)}}>close + { + event.stopPropagation(); this.removeTab(index, tab.id) + + }}>close ` : html` ${title} - {this.removeTab(index, tab.id)}}>close + {event.stopPropagation(); this.removeTab(index, tab.id)}}>close `} @@ -656,7 +659,7 @@ class ShowPlugin extends connect(store)(LitElement) { this.createEpmlInstance(frame, newIndex) } - removeTab(index, tabA) { + removeTab(index, tabA) { const tabB = this.tabs.length - 1 const tabC = this.tabs[tabB].id @@ -668,10 +671,10 @@ class ShowPlugin extends connect(store)(LitElement) { let iconId = '' this.tabs = this.tabs.filter((tab, tIndex) => tIndex !== index) + const tabD = this.tabs.length - 1 const plugObj = this.tabs[tabD].url - theId = this.tabs[tabD].id tabId = 'tab-' + theId frameId = 'frame-' + theId