Skip to content

A platform for community discussion. Free, open, simple.

DOC: document addShortcut click option (#12467)

Joffrey JAFFEUXc3e76da90a34
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