From 910aa1ad7f2717cf7c266e22ab9e58ed34aac2e4 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 18:12:03 -0700 Subject: [PATCH] Properly prepare text for clipboard for context menu This makes the context menu in macOS embed the right text --- src/handlers/Clipboard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/Clipboard.ts b/src/handlers/Clipboard.ts index 26305602..036a6d8f 100644 --- a/src/handlers/Clipboard.ts +++ b/src/handlers/Clipboard.ts @@ -113,7 +113,7 @@ export function rightClickHandler(ev: MouseEvent, textarea: HTMLTextAreaElement, textarea.style.zIndex = '1000'; // Get textarea ready to copy from the context menu - textarea.value = selectionManager.selectionText; + textarea.value = prepareTextForClipboard(selectionManager.selectionText); textarea.focus(); textarea.select();