From f08592e0f848a506e5aba858b24c89ce982a6864 Mon Sep 17 00:00:00 2001 From: Akil Date: Sat, 28 Jun 2025 01:11:25 +0300 Subject: [PATCH] Touch selection handle --- src/components/SelectableParagraph.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/SelectableParagraph.jsx b/src/components/SelectableParagraph.jsx index 0dba872..d7e21a0 100644 --- a/src/components/SelectableParagraph.jsx +++ b/src/components/SelectableParagraph.jsx @@ -12,6 +12,9 @@ const SelectableParagraph = ({ content, surahNo, verseNo, onDetailClick }) => { }); const handleTextSelect = (e) => { + // e.preventDefault(); + // e.stopPropagation(); + const selection = window.getSelection(); // console.log('selection', selection.toString()); if (!selection || selection.toString().trim() === '') { @@ -29,7 +32,7 @@ const SelectableParagraph = ({ content, surahNo, verseNo, onDetailClick }) => { y: rect.bottom }, visible: true - }); + }); }; useEffect(() => { @@ -92,7 +95,8 @@ const SelectableParagraph = ({ content, surahNo, verseNo, onDetailClick }) => { >
{ setSelection(prev => ({ ...prev, visible: false })); }}