added the ability to close the command line by clicking the dark area

This commit is contained in:
Jack 2020-06-27 00:54:18 +01:00
parent 492d742842
commit a8550f89a2

View file

@ -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();