Skip to content

Commit

Permalink
Don't show already hidden tab preview tooltip on updated
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Nov 29, 2024
1 parent bcaf1e6 commit 7609de9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions webextensions/resources/tab-preview-frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ try{
switch (message?.type) {
case 'treestyletab:update-tab-preview':
if (!panel ||
(message.tabId &&
panel.dataset.tabId != message.tabId)) {
panel.dataset.tabId != message.tabId ||
panel.classList.contains('hidden')) {
return;
}
case 'treestyletab:show-tab-preview':
Expand Down
4 changes: 2 additions & 2 deletions webextensions/sidebar/tab-preview-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ async function sendTabPreviewMessage(tabId, message, deferredReturnedValueResolv
return promisedReturnedValue;
}

if (!returnValue) {
// Failed to show in-content tab preview, so
if (typeof returnValue != 'boolean') {
// Failed to send message to the in-content tab preview frame, so
// now we fall back to the in-sidebar tab preview.
return sendInSidebarTabPreviewMessage(message);
}
Expand Down

0 comments on commit 7609de9

Please sign in to comment.