From ecbbfa39a22c2e70a2c5af262d77dea80fb309f8 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 14 Dec 2021 14:55:24 -0500 Subject: Fix non-text elements being included in scanning content (#2034) --- ext/js/dom/document-util.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ext/js') diff --git a/ext/js/dom/document-util.js b/ext/js/dom/document-util.js index 8c7adf2c..163800c1 100644 --- a/ext/js/dom/document-util.js +++ b/ext/js/dom/document-util.js @@ -39,8 +39,10 @@ class DocumentUtil { case 'SELECT': return new TextSourceElement(element); case 'INPUT': - imposterSourceElement = element; - [imposter, imposterContainer] = this._createImposter(element, false); + if (element.type === 'text') { + imposterSourceElement = element; + [imposter, imposterContainer] = this._createImposter(element, false); + } break; case 'TEXTAREA': imposterSourceElement = element; -- cgit v1.2.3