From 8a5a0c2451bbaecf5371a1c78dd564424ded2516 Mon Sep 17 00:00:00 2001 From: Aiello Date: Mon, 29 May 2023 10:07:52 +0800 Subject: [PATCH 1/2] fix(event): Remove command + arrow right navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前就是因为 command + left 和 right 会导致错误地跳转,才将其转换为 command + [ 和 command + ] 跳转的 --- src-tauri/src/inject/event.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src-tauri/src/inject/event.js b/src-tauri/src/inject/event.js index b0830bc..29d55ea 100644 --- a/src-tauri/src/inject/event.js +++ b/src-tauri/src/inject/event.js @@ -1,8 +1,6 @@ const shortcuts = { ArrowUp: () => scrollTo(0, 0), ArrowDown: () => scrollTo(0, document.body.scrollHeight), - ArrowLeft: () => window.history.back(), - ArrowRight: () => window.history.forward(), '[': () => window.history.back(), ']': () => window.history.forward(), r: () => window.location.reload(), From 97a890f90e5f89c0dd4873927e1dbf50677ee95b Mon Sep 17 00:00:00 2001 From: Aiello Date: Mon, 29 May 2023 10:12:17 +0800 Subject: [PATCH 2/2] fix(event): Comment instead --- src-tauri/src/inject/event.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-tauri/src/inject/event.js b/src-tauri/src/inject/event.js index 29d55ea..c9bd3ee 100644 --- a/src-tauri/src/inject/event.js +++ b/src-tauri/src/inject/event.js @@ -1,6 +1,10 @@ const shortcuts = { ArrowUp: () => scrollTo(0, 0), ArrowDown: () => scrollTo(0, document.body.scrollHeight), + // Don't use command + ArrowLeft or command + ArrowRight + // When editing text in page, it causes unintended page navigation. + // ArrowLeft: () => window.history.back(), + // ArrowRight: () => window.history.forward(), '[': () => window.history.back(), ']': () => window.history.forward(), r: () => window.location.reload(),