summaryrefslogtreecommitdiffstats
path: root/client/components/cards/minicard.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/cards/minicard.js')
-rw-r--r--client/components/cards/minicard.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js
index 81d8c0d4..8f229be8 100644
--- a/client/components/cards/minicard.js
+++ b/client/components/cards/minicard.js
@@ -23,6 +23,14 @@ BlazeComponent.extendComponent({
evt.preventDefault();
var methodName = evt.shiftKey ? 'toogleRange' : 'toogle';
MultiSelection[methodName](this.currentData()._id);
+
+ // If the card is already selected, we want to de-select it.
+ // XXX We should probably modify the minicard href attribute instead of
+ // overwriting the event in case the card is already selected.
+ } else if (Session.equals('currentCard', this.currentData()._id)) {
+ evt.stopImmediatePropagation();
+ evt.preventDefault();
+ Utils.goBoardId(Session.get('currentBoard'));
}
},