From 9bda0a9eb43e127fdaa0066fba7e3e73c9f74812 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 20 Oct 2020 20:53:18 -0400 Subject: Popup preview fixes (#948) * Select just the text node and not its container * Make background color transparent by default --- ext/bg/js/settings/popup-preview-frame.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/bg/js') diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js index 7e177453..1a05a48d 100644 --- a/ext/bg/js/settings/popup-preview-frame.js +++ b/ext/bg/js/settings/popup-preview-frame.js @@ -224,7 +224,7 @@ class PopupPreviewFrame { if (textNode === null) { return; } const range = document.createRange(); - range.selectNode(textNode); + range.selectNodeContents(textNode); const source = new TextSourceRange(range, range.toString(), null, null); try { -- cgit v1.2.3