From c5b0a58518189db9879f79ab507928357136ca4a Mon Sep 17 00:00:00 2001 From: Potatochips2001 <76017734+Potatochips2001@users.noreply.github.com> Date: Fri, 14 Oct 2022 03:47:42 -0400 Subject: [PATCH] Update client.js --- client/client.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/client.js b/client/client.js index 5306ade..39c03d2 100644 --- a/client/client.js +++ b/client/client.js @@ -7,6 +7,14 @@ * */ +//select "chatinput" on "/" +document.addEventListener("keydown", e => { + if (e.key === '/' && document.getElementById("chatinput") != document.activeElement) { + e.preventDefault(); + document.getElementById("chatinput").focus(); + } +}); + // initialize markdown engine var markdownOptions = { html: false,