A platform for community discussion. Free, open, simple.
FIX: do not automatically route all actions to hovered posts
Sam5bdc00c3bee4
diff --git a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6index 37d6db132f0..01b9e3372e3 100644--- a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6+++ b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6@@ -36,6 +36,9 @@ const bindings = {"command+up": { handler: "goToFirstPost", anonymous: true },j: { handler: "selectDown", anonymous: true },k: { handler: "selectUp", anonymous: true },+ // we use this odd routing here vs a postAction: cause like+ // has an animation so the widget handles that+ // TODO: teach controller how to trigger the widget animationl: { click: ".topic-post.selected button.toggle-like" },"m m": { handler: "setTrackingToMuted" }, // mark topic as muted"m r": { handler: "setTrackingToRegular" }, // mark topic as regular@@ -301,10 +304,6 @@ export default {$(".topic-post.selected article.boxed").data("post-id"),10);- if (!selectedPostId) {- // If no post was selected, automatically select the hovered post.- selectedPostId = parseInt($("article.boxed:hover").data("post-id"), 10);- }if (selectedPostId) {const topicController = container.lookup("controller:topic");const post = topicController