summaryrefslogtreecommitdiffstats
path: root/client/lib/popup.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/lib/popup.js')
-rw-r--r--client/lib/popup.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/lib/popup.js b/client/lib/popup.js
index 04f7dbf6..70f2660f 100644
--- a/client/lib/popup.js
+++ b/client/lib/popup.js
@@ -201,3 +201,7 @@ $(document).on('click', function(evt) {
Popup.close();
}
});
+
+// Press escape to close the popup.
+var bindPopup = function(f) { return _.bind(f, Popup); };
+EscapeActions.register(20, bindPopup(Popup.isOpen), bindPopup(Popup.close));