Fix opening search from context menu (#3591)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
filtered
2025-04-24 07:54:27 +10:00
committed by GitHub
parent 9cf3a0e568
commit 2ef8b7cfd7
2 changed files with 23 additions and 2 deletions

View File

@@ -158,7 +158,10 @@ const showContextMenu = (e: CanvasPointerEvent) => {
const commonOptions = {
e,
allow_searchbox: true,
showSearchBox: () => showSearchBox(e)
showSearchBox: () => {
cancelResetOnContextClose()
showSearchBox(e)
}
}
const connectionOptions =
toType === 'input'
@@ -200,7 +203,12 @@ const showContextMenu = (e: CanvasPointerEvent) => {
)
// Reset when the context menu is closed
useEventListener(menu.controller.signal, 'abort', reset, options)
const cancelResetOnContextClose = useEventListener(
menu.controller.signal,
'abort',
reset,
options
)
}
// Disable litegraph's default behavior of release link and search box.