On stream click, blur so key events unbind from sidebar.

Unblur the link that was clicked so that when a user presses up/down
buttons it will automatically go back over to the individual messages
rather than tabbing up and down the sidebar.

Fixes: #1875.
This commit is contained in:
Brock Whittaker 2016-09-29 12:56:50 -07:00 committed by Tim Abbott
parent 64238f9426
commit 70af5b49e0
1 changed files with 8 additions and 0 deletions

View File

@ -241,6 +241,14 @@ $(function () {
e.preventDefault();
});
(function () {
var sel = ["#group-pm-list", "#stream_filters", "#global_filters", "#user_presences"].join(", ");
$(sel).on("click", "a", function () {
this.blur();
});
}());
popovers.register_click_handlers();
notifications.register_click_handlers();