From 331a5edbf96e5f93f97e24d01350b0692d461fdc Mon Sep 17 00:00:00 2001 From: JzoNg Date: Mon, 20 Oct 2025 15:57:39 +0800 Subject: [PATCH] fix: drag icon position --- .../plugins/draggable-plugin/index.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/web/app/components/base/prompt-editor/plugins/draggable-plugin/index.tsx b/web/app/components/base/prompt-editor/plugins/draggable-plugin/index.tsx index cba7dcd8a6..24b6c38e98 100644 --- a/web/app/components/base/prompt-editor/plugins/draggable-plugin/index.tsx +++ b/web/app/components/base/prompt-editor/plugins/draggable-plugin/index.tsx @@ -29,7 +29,7 @@ export default function DraggableBlockPlugin({ }): JSX.Element { const menuRef = useRef(null) const targetLineRef = useRef(null) - const [draggableElement, setDraggableElement] = useState( + const [, setDraggableElement] = useState( null, ) const [editor] = useLexicalComposerContext() @@ -55,20 +55,20 @@ export default function DraggableBlockPlugin({ menuRef={menuRef as any} targetLineRef={targetLineRef as any} menuComponent={ - isSupportDrag ?
+ isSupportDrag ?
: null } targetLineComponent={
-
-
+ className="pointer-events-none absolute left-[-21px] top-0 opacity-0 will-change-transform" + // style={{ width: 500 }} // width not worked here + > +
+
} isOnMenu={isOnMenu} onElementChanged={setDraggableElement}