From 26f12d79f0f3289ae573e66b507892d5a71e3bb1 Mon Sep 17 00:00:00 2001 From: YunfangHou Date: Sat, 13 Apr 2024 01:11:25 +0100 Subject: [PATCH 1/2] enable focusInput to focus all input fields in the whold page --- content_scripts/mode_normal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content_scripts/mode_normal.js b/content_scripts/mode_normal.js index 460bcee0b..a57bad866 100644 --- a/content_scripts/mode_normal.js +++ b/content_scripts/mode_normal.js @@ -256,7 +256,7 @@ const NormalModeCommands = { for (let i = 0, end = resultSet.snapshotLength; i < end; i++) { element = resultSet.snapshotItem(i); - if (!DomUtils.getVisibleClientRect(element, true)) { + if (!element.getClientRects(element, true)) { continue; } visibleInputs.push({ element, index: i, rect: Rect.copy(element.getBoundingClientRect()) }); From 165a5fb466bb4afc50f78a83f9a7295e88300261 Mon Sep 17 00:00:00 2001 From: YunfangHou Date: Sat, 13 Apr 2024 01:51:05 +0100 Subject: [PATCH 2/2] fix bug --- content_scripts/mode_normal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content_scripts/mode_normal.js b/content_scripts/mode_normal.js index a57bad866..a7fcad9bd 100644 --- a/content_scripts/mode_normal.js +++ b/content_scripts/mode_normal.js @@ -256,7 +256,7 @@ const NormalModeCommands = { for (let i = 0, end = resultSet.snapshotLength; i < end; i++) { element = resultSet.snapshotItem(i); - if (!element.getClientRects(element, true)) { + if (!element.getClientRects()[0]) { continue; } visibleInputs.push({ element, index: i, rect: Rect.copy(element.getBoundingClientRect()) });