fix: prevent search menu from opening when dialog is open (#9279)
This commit is contained in:
parent
6c0ff7fc5c
commit
56c05b3099
@ -25,6 +25,10 @@ export const actionToggleSearchMenu = register({
|
|||||||
predicate: (appState) => appState.gridModeEnabled,
|
predicate: (appState) => appState.gridModeEnabled,
|
||||||
},
|
},
|
||||||
perform(elements, appState, _, app) {
|
perform(elements, appState, _, app) {
|
||||||
|
if (appState.openDialog) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
appState.openSidebar?.name === DEFAULT_SIDEBAR.name &&
|
appState.openSidebar?.name === DEFAULT_SIDEBAR.name &&
|
||||||
appState.openSidebar.tab === CANVAS_SEARCH_TAB
|
appState.openSidebar.tab === CANVAS_SEARCH_TAB
|
||||||
|
@ -297,6 +297,10 @@ export const SearchMenu = () => {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
if (app.state.openDialog) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!searchInputRef.current?.matches(":focus")) {
|
if (!searchInputRef.current?.matches(":focus")) {
|
||||||
if (app.state.openDialog) {
|
if (app.state.openDialog) {
|
||||||
setAppState({
|
setAppState({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user