From 154a0b1e6e8ff0c6d4e82745df368a3f212815e8 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 5 Jun 2020 13:32:56 -0400 Subject: [PATCH] hide the drive's contextmenu when you hit escape --- www/common/drive-ui.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 413b2624f..8c8d7f5f1 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -526,6 +526,8 @@ define([ } }); }); + + return $(menu); }; @@ -919,6 +921,11 @@ define([ if (e.ctrlKey) { ev.ctrlKey = true; } if (e.shiftKey) { ev.shiftKey = true; } + // ESC + if (e.which === 27) { + return void APP.hideMenu(); + } + // Enter if (e.which === 13) { var $allSelected = $content.find('.cp-app-drive-element.cp-app-drive-element-selected');