Skip to content

Commit 3bc27d7

Browse files
author
John McCambridge
committed
Allow use of the enter key for password input for code-server
1 parent 3fae68b commit 3bc27d7

File tree

1 file changed

+6
-0
lines changed
  • packages/app/browser/src

1 file changed

+6
-0
lines changed

packages/app/browser/src/app.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ submit.addEventListener("click", () => {
2828
document.cookie = `password=${password.value}`;
2929
location.reload();
3030
});
31+
password.addEventListener("keyup", (e) => {
32+
if (e.keyCode === 13) {
33+
document.cookie = `password=${password.value}`;
34+
location.reload();
35+
}
36+
});
3137

3238
/**
3339
* Notify user on load of page if previous password was unsuccessful

0 commit comments

Comments
 (0)