From c3e76da90a34d6bd442dd1bebcf6fd002cdb3068 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 22 Mar 2021 09:51:45 +0100 Subject: [PATCH] DOC: document addShortcut click option (#12467) --- app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js b/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js index b85652d4604..4d724e4f53e 100644 --- a/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js +++ b/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js @@ -194,6 +194,8 @@ export default { * - path - a specific path to limit the shortcut to .e.g /latest * - postAction - binds the shortcut to fire the specified post action when a * post is selected + * - click - allows to provide a selector on which a click event + * will be triggered, eg: { click: ".topic.last .title" } **/ addShortcut(shortcut, callback, opts = {}) { // we trim but leave whitespace between characters, as shortcuts