From 9d52c77207c63cd810a8dc30dd0140111cd25e7d Mon Sep 17 00:00:00 2001 From: nakamuraos Date: Thu, 7 Jan 2021 11:40:11 +0700 Subject: [PATCH 1/2] Add click anywhere will focus to shell input --- shell.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/shell.php b/shell.php index 8d395bf..9bb37af 100644 --- a/shell.php +++ b/shell.php @@ -427,6 +427,13 @@ function getQueryString() { xhr.send(getQueryString()); } + function focusShellCmd() { + var selection = window.getSelection(); + if(!selection.toString()) { + document.getElementById('shell-cmd').focus(); + } + } + window.onload = function() { eShellCmdInput = document.getElementById("shell-cmd"); eShellContent = document.getElementById("shell-content"); @@ -436,7 +443,7 @@ function getQueryString() { - +