From 2bc442f8ee2e4b8043d23d07b3f8466abc7b47c6 Mon Sep 17 00:00:00 2001 From: Khai Truong <56820749+khaitruong922@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:14:32 +0700 Subject: [PATCH] Allow scanning on input type = 'search' (#1443) --- ext/js/dom/text-source-generator.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/js/dom/text-source-generator.js b/ext/js/dom/text-source-generator.js index ca14204921..52b2bc8cf6 100644 --- a/ext/js/dom/text-source-generator.js +++ b/ext/js/dom/text-source-generator.js @@ -204,7 +204,10 @@ export class TextSourceGenerator { case 'SELECT': return TextSourceElement.create(element); case 'INPUT': - if (/** @type {HTMLInputElement} */ (element).type === 'text') { + if ( + /** @type {HTMLInputElement} */ (element).type === 'text' || + /** @type {HTMLInputElement} */ (element).type === 'search' + ) { imposterSourceElement = element; [imposter, imposterContainer] = this._createImposter(/** @type {HTMLInputElement} */ (element), false); }