From 2d26966f58b0688f5a489dca5b96bcdd93e1bdc2 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 30 Dec 2019 11:49:32 -0800 Subject: [PATCH] Allow copying text with emojis, resolves #1530 --- app/src/web/ts/context_a.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/web/ts/context_a.ts b/app/src/web/ts/context_a.ts index b9549f3fb..9faa1e942 100644 --- a/app/src/web/ts/context_a.ts +++ b/app/src/web/ts/context_a.ts @@ -63,7 +63,8 @@ }; const _getImageStyleUrl = (el: Element): string | null => { - const img = el.querySelector("[style*=\"background-image: url(\"]"); + // Emojis and special characters may be images from a span + const img = el.querySelector("[style*=\"background-image: url(\"]:not(span)"); if (!img) { return null }