1
0
mirror of https://github.com/lus/pasty.git synced 2023-08-10 21:13:09 +03:00

Fix tabulator key input

This commit is contained in:
Lukas SP
2020-08-24 19:30:33 +02:00
parent fa7699d17b
commit a1cd915759
2 changed files with 7 additions and 2 deletions

View File

@@ -56,6 +56,11 @@ async function loadPaste() {
const input = document.getElementById("input");
input.classList.remove("hidden");
input.focus();
window.addEventListener("keydown", function(event) {
if (event.keyCode != 9) return;
event.preventDefault();
input.value += " ";
});
}
}
spinner.surround(loadPaste);