From caee6a67fbcc542810c25e1f88ab4965f272dacf Mon Sep 17 00:00:00 2001 From: Sheng Date: Fri, 12 Jul 2019 22:38:48 +0800 Subject: [PATCH] Delay the command execution --- webssh/static/js/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js index 520241b..f3377c5 100644 --- a/webssh/static/js/main.js +++ b/webssh/static/js/main.js @@ -341,8 +341,11 @@ jQuery(function($){ if (!term.resized) { resize_terminal(term); term.resized = true; + if (url_opts_data.command) { - sock.send(JSON.stringify({'data': url_opts_data.command+'\r'})); + setTimeout(function () { + sock.send(JSON.stringify({'data': url_opts_data.command+'\r'})); + }, 500); } } }