mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: prevent search menu from opening when dialog is open
This commit is contained in:
parent
99d8bff175
commit
75bf984cec
2 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,10 @@ export const actionToggleSearchMenu = register({
|
|||
predicate: (appState) => appState.gridModeEnabled,
|
||||
},
|
||||
perform(elements, appState, _, app) {
|
||||
if (appState.openDialog) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
appState.openSidebar?.name === DEFAULT_SIDEBAR.name &&
|
||||
appState.openSidebar.tab === CANVAS_SEARCH_TAB
|
||||
|
|
|
@ -254,6 +254,10 @@ export const SearchMenu = () => {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (app.state.openDialog) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!searchInputRef.current?.matches(":focus")) {
|
||||
if (app.state.openDialog) {
|
||||
setAppState({
|
||||
|
|
Loading…
Add table
Reference in a new issue