diff --git a/src/containers/Organization/Video/RightPanel.jsx b/src/containers/Organization/Video/RightPanel.jsx index 8508649d..0dbee263 100644 --- a/src/containers/Organization/Video/RightPanel.jsx +++ b/src/containers/Organization/Video/RightPanel.jsx @@ -250,16 +250,16 @@ const RightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, s }, [limit, currentOffset]); const onMouseUp = (e, blockIdx) => { - setTimeout(() => { - setCurrentIndex(blockIdx); - }, 100); - - if (e && e.target) { - const { selectionStart, value } = e.target; - if (selectionStart !== undefined && value !== undefined) { - setShowPopOver(true); - setCurrentIndexToSplitTextBlock(blockIdx); - setSelectionStart(selectionStart); + setTimeout(() => { + setCurrentIndex(blockIdx); + }, 100); + + if (e && e.target) { + const { selectionStart, value } = e.target; + if (selectionStart !== undefined && value !== undefined) { + setShowPopOver(true); + setCurrentIndexToSplitTextBlock(blockIdx); + setSelectionStart(selectionStart); } } @@ -550,6 +550,7 @@ const RightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, s return 0; }; + const handleAutosave = () => { const reqBody = { task_id: taskId, @@ -630,6 +631,7 @@ const RightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, s }, }, ]; + return ( <> @@ -784,7 +786,7 @@ const RightPanel = ({ currentIndex, currentSubs,setCurrentIndex, showTimeline, s ref={(el) => (textboxes.current[index] = el)} onBlur={() => { setTimeout(() => { - setShowPopOver(false); + // setShowPopOver(false); }, 200); }} /> diff --git a/src/containers/Organization/Video/components/SettingsButtonComponent.jsx b/src/containers/Organization/Video/components/SettingsButtonComponent.jsx index 2b40cad0..0ab5e6b7 100644 --- a/src/containers/Organization/Video/components/SettingsButtonComponent.jsx +++ b/src/containers/Organization/Video/components/SettingsButtonComponent.jsx @@ -142,6 +142,7 @@ const SettingsButtonComponent = ({ return false; }; + const handleScript = () => { setAnchorElSettings(null);