From 069b489fb666d467c656f180d6852a3e46a73c55 Mon Sep 17 00:00:00 2001 From: sitzmar Date: Fri, 26 Jan 2018 08:04:59 -0800 Subject: [PATCH] adjust timeout to ensure right-click event has fired --- src/handlers/Clipboard.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handlers/Clipboard.ts b/src/handlers/Clipboard.ts index fd2b3d77..035b5fff 100644 --- a/src/handlers/Clipboard.ts +++ b/src/handlers/Clipboard.ts @@ -100,6 +100,7 @@ export function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextA textarea.focus(); // Reset the terminal textarea's styling + // Timeout needs to be long enough for click event to be handled. setTimeout(() => { textarea.style.position = null; textarea.style.width = null; @@ -107,7 +108,7 @@ export function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextA textarea.style.left = null; textarea.style.top = null; textarea.style.zIndex = null; - }, 4); + }, 200); } /**