mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-03 12:04:57 +08:00
added the ability to close the command line by clicking the dark area
This commit is contained in:
parent
492d742842
commit
a8550f89a2
1 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue