summaryrefslogtreecommitdiffstats
path: root/client/components/boards/router.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards/router.js')
-rw-r--r--client/components/boards/router.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/components/boards/router.js b/client/components/boards/router.js
index 9c5bee35..80fadd9e 100644
--- a/client/components/boards/router.js
+++ b/client/components/boards/router.js
@@ -39,7 +39,7 @@ Router.route('/boards/:boardId/:slug/:cardId', {
template: 'board',
onAfterAction: function() {
Tracker.nonreactive(function() {
- if (! Session.get('currentCard') && typeof Sidebar !== 'undefined') {
+ if (! Session.get('currentCard') && Sidebar) {
Sidebar.hide();
}
});
@@ -55,3 +55,9 @@ Router.route('/boards/:boardId/:slug/:cardId', {
return Boards.findOne(this.params.boardId);
}
});
+
+// Close the card details pane by pressing escape
+EscapeActions.register(50,
+ function() { return ! Session.equals('currentCard', null); },
+ function() { Utils.goBoardId(Session.get('currentBoard')); }
+);