From 13afcf990b09b6a1364065ecd9e4fcc2104bb4a8 Mon Sep 17 00:00:00 2001 From: breeg554 Date: Tue, 15 Oct 2024 10:30:00 +0200 Subject: [PATCH] DO NOT COPY BLOCKS when there is a selected text --- .../app/components/pages/pipelines/useCopyPasteNode.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/web-remix/app/components/pages/pipelines/useCopyPasteNode.tsx b/apps/web-remix/app/components/pages/pipelines/useCopyPasteNode.tsx index 79337b222..6b86c9d2f 100644 --- a/apps/web-remix/app/components/pages/pipelines/useCopyPasteNode.tsx +++ b/apps/web-remix/app/components/pages/pipelines/useCopyPasteNode.tsx @@ -26,6 +26,8 @@ export const useCopyPasteNode = ({ ); useEventListener('keydown', (e) => { + if (window.getSelection()?.toString()) return; + if ( //eslint-disable-next-line //@ts-ignore