fix(ui): allow escape to close mobile settings (#1144)
Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
This commit is contained in:
committed by
GitHub
co-authored by
Isaac Sanchez
parent
71e902fec6
commit
4ac5d7699a
@@ -403,11 +403,6 @@ export const useKeyboardShortcuts = () => {
|
||||
target?.getAttribute('data-terminal-hidden-input') === 'true'
|
||||
);
|
||||
|
||||
if (isInsideDialog || isSettingsMounted || isInsideTerminal) {
|
||||
resetAbortPriming();
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
isSettingsDialogOpen,
|
||||
isCommandPaletteOpen,
|
||||
@@ -419,6 +414,11 @@ export const useKeyboardShortcuts = () => {
|
||||
activeMainTab,
|
||||
} = useUIStore.getState();
|
||||
|
||||
if (isInsideDialog || isInsideTerminal) {
|
||||
resetAbortPriming();
|
||||
return;
|
||||
}
|
||||
|
||||
// If settings is open, close it
|
||||
if (isSettingsDialogOpen) {
|
||||
e.preventDefault();
|
||||
@@ -427,6 +427,11 @@ export const useKeyboardShortcuts = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isSettingsMounted) {
|
||||
resetAbortPriming();
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if any overlay is open or not on chat tab - don't process abort
|
||||
const hasOverlay = isCommandPaletteOpen || isHelpDialogOpen || isSessionSwitcherOpen || isAboutDialogOpen || isMultiRunLauncherOpen || isImagePreviewOpen;
|
||||
const isChatActive = activeMainTab === 'chat';
|
||||
|
||||
Reference in New Issue
Block a user