diff --git a/Changelog.md b/Changelog.md index 7128eb6a6..126cf26e8 100644 --- a/Changelog.md +++ b/Changelog.md @@ -41,6 +41,7 @@ and on a pod that received that data. * Guard against passing nil into person\_image\_tag [#6286](https://github.com/diaspora/diaspora/pull/6286) * Prevent Handlebars from messing up indentation of pre tags [#6339](https://github.com/diaspora/diaspora/pull/6339) * Fix pagination design on notifications page [#6364](https://github.com/diaspora/diaspora/pull/6364) +* Improve handling of j/k hotkeys [#6462](https://github.com/diaspora/diaspora/pull/6462) ## Features diff --git a/app/assets/javascripts/app/app.js b/app/assets/javascripts/app/app.js index 4ff89cf3e..8413f700e 100644 --- a/app/assets/javascripts/app/app.js +++ b/app/assets/javascripts/app/app.js @@ -101,10 +101,18 @@ var app = { // there's probably a better way to do this... $(document).on("click", "a[rel=backbone]", function(evt){ + if (!(app.stream && /^\/(?:stream|activity|aspects|public|mentions|likes)/.test(app.stream.basePath()))) { + // We aren't on a regular stream page + return; + } + evt.preventDefault(); var link = $(this); - - $(".stream_title").text(link.text()); + if(link.data("stream-title") && link.data("stream-title").length) { + $(".stream_title").text(link.data("stream-title")); + } else { + $(".stream_title").text(link.text()); + } app.router.navigate(link.attr("href").substring(1) ,true); }); }, diff --git a/app/assets/templates/header_tpl.jst.hbs b/app/assets/templates/header_tpl.jst.hbs index 199f6ff52..afe8ee52d 100644 --- a/app/assets/templates/header_tpl.jst.hbs +++ b/app/assets/templates/header_tpl.jst.hbs @@ -1,19 +1,19 @@