From a8550f89a21092f3096f187671a5673c2826de3d Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 27 Jun 2020 00:54:18 +0100 Subject: [PATCH] added the ability to close the command line by clicking the dark area --- public/js/commandline.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/js/commandline.js b/public/js/commandline.js index a76762799..cf26e2bcf 100644 --- a/public/js/commandline.js +++ b/public/js/commandline.js @@ -642,6 +642,13 @@ $("#commandLineWrapper #commandLine .suggestions").click(e =>{ triggerCommand($(e.target).attr('command')); }) + +$('#commandLineWrapper').click(e => { + if($(e.target).attr('id') === "commandLineWrapper"){ + hideCommandLine(); + } +}) + $(document).keydown((e) => { if(!$("#commandLineWrapper").hasClass("hidden")){ $("#commandLine input").focus();