fix(ribbon): not dismissing active tab after change

This commit is contained in:
Elian Doran 2025-11-09 20:17:13 +02:00
parent 6f245ec8d5
commit 8e697d0578
No known key found for this signature in database

View File

@ -46,7 +46,7 @@ export default function Ribbon() {
if (!computedTabs) return;
const tabToActivate = computedTabs.find(tab => tab.shouldShow && (typeof tab.activate === "boolean" ? tab.activate : tab.activate?.(titleContext)));
setActiveTabIndex(tabToActivate?.index);
}, [ note?.noteId ]);
}, [ computedTabs, note?.noteId ]);
// Register keyboard shortcuts.
const eventsToListenTo = useMemo(() => TAB_CONFIGURATION.filter(config => config.toggleCommand).map(config => config.toggleCommand) as EventNames[], []);