Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: prompt editor click to insert variable (#21470)

zxhlyh819c02f1f5e3
diff --git a/web/app/components/base/prompt-editor/plugins/component-picker-block/variable-option.tsx b/web/app/components/base/prompt-editor/plugins/component-picker-block/variable-option.tsx
index 20c03768d08..57de34a7012 100644
--- a/web/app/components/base/prompt-editor/plugins/component-picker-block/variable-option.tsx
+++ b/web/app/components/base/prompt-editor/plugins/component-picker-block/variable-option.tsx
@@ -44,6 +44,10 @@ export const VariableMenuItem = memo(({
tabIndex={-1}
ref={setRefElement}
onMouseEnter={onMouseEnter}
+ onMouseDown={(e) => {
+ e.preventDefault()
+ e.stopPropagation()
+ }}
onClick={onClick}>
<div className='mr-2'>
{icon}