diff --git a/web/app/components/base/prompt-editor/plugins/component-picker-block/index.tsx b/web/app/components/base/prompt-editor/plugins/component-picker-block/index.tsx index b43d2c811..bffcdc60d 100644 --- a/web/app/components/base/prompt-editor/plugins/component-picker-block/index.tsx +++ b/web/app/components/base/prompt-editor/plugins/component-picker-block/index.tsx @@ -165,6 +165,7 @@ const ComponentPicker = ({ isSupportFileVar={isSupportFileVar} onClose={handleClose} onBlur={handleClose} + autoFocus={false} /> ) diff --git a/web/app/components/workflow/hooks/use-shortcuts.ts b/web/app/components/workflow/hooks/use-shortcuts.ts index 8b1003e89..0d0ba80fe 100644 --- a/web/app/components/workflow/hooks/use-shortcuts.ts +++ b/web/app/components/workflow/hooks/use-shortcuts.ts @@ -61,7 +61,7 @@ export const useShortcuts = (): void => { return !showFeaturesPanel && !isEventTargetInputArea(e.target as HTMLElement) }, [workflowStore]) - useKeyPress(['delete', 'backspace'], (e) => { + useKeyPress(['delete'], (e) => { if (shouldHandleShortcut(e)) { e.preventDefault() handleNodesDelete() diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx index 9acbdf4ff..27063a2ba 100644 --- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx +++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx @@ -260,6 +260,7 @@ type Props = { maxHeightClass?: string onClose?: () => void onBlur?: () => void + autoFocus?: boolean } const VarReferenceVars: FC = ({ hideSearch, @@ -271,6 +272,7 @@ const VarReferenceVars: FC = ({ maxHeightClass, onClose, onBlur, + autoFocus = true, }) => { const { t } = useTranslation() const [searchText, setSearchText] = useState('') @@ -323,7 +325,7 @@ const VarReferenceVars: FC = ({ onKeyDown={handleKeyDown} onClear={() => setSearchText('')} onBlur={onBlur} - autoFocus + autoFocus={autoFocus} />