From 9eb7c37098781f7b21ceeece0213594af4376a77 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 24 Mar 2021 23:51:51 +0100 Subject: [PATCH] FIX: Make mobile back/forward keybinds work for anons (#12512) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You don't need to be logged in to browse a forum in Discourse Hub 😃 --- .../javascripts/discourse/app/lib/keyboard-shortcuts.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js b/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js index 4d724e4f53e..5b2b230fbf2 100644 --- a/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js +++ b/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js @@ -23,10 +23,10 @@ const DEFAULT_BINDINGS = { "shift+c": { handler: "focusComposer" }, "ctrl+f": { handler: "showPageSearch", anonymous: true }, "command+f": { handler: "showPageSearch", anonymous: true }, - "command+left": { handler: "webviewKeyboardBack" }, - "command+[": { handler: "webviewKeyboardBack" }, - "command+right": { handler: "webviewKeyboardForward" }, - "command+]": { handler: "webviewKeyboardForward" }, + "command+left": { handler: "webviewKeyboardBack", anonymous: true }, + "command+[": { handler: "webviewKeyboardBack", anonymous: true }, + "command+right": { handler: "webviewKeyboardForward", anonymous: true }, + "command+]": { handler: "webviewKeyboardForward", anonymous: true }, "mod+p": { handler: "printTopic", anonymous: true }, d: { postAction: "deletePost" }, e: { postAction: "editPost" },