fix: limit selection btn in window & click to hide

This commit is contained in:
Gabe Yuan
2024-04-12 22:28:40 +08:00
parent 7379ff8d15
commit 923d3293cd
2 changed files with 12 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ export default function Slection({
useEffect(() => {
async function handleMouseup(e) {
e.stopPropagation();
await sleep(10);
await sleep(100);
const selectedText = window.getSelection()?.toString()?.trim() || "";
setSelText(selectedText);