diff --git a/TODO.md b/TODO.md index a88af0c..4906f3e 100644 --- a/TODO.md +++ b/TODO.md @@ -12,7 +12,7 @@ A more complex version of this list is available [here](https://trello.com/b/kJw - [ ] Installation documentation - [ ] LaTeX support - [ ] Notifications -- [ ] Make the damn textbox stop unfocusing on every message submit +- [x] Make the damn textbox stop unfocusing on every message submit - [ ] Message context menus - [ ] Message Timestamps - [x] Markdown Support diff --git a/src/routes/(main)/channel/[channel]/+page.svelte b/src/routes/(main)/channel/[channel]/+page.svelte index 8636c42..b1bf92a 100644 --- a/src/routes/(main)/channel/[channel]/+page.svelte +++ b/src/routes/(main)/channel/[channel]/+page.svelte @@ -21,7 +21,8 @@ let textareaRef: HTMLTextAreaElement | undefined = $state(); let formref: HTMLFormElement | undefined = $state(); - function submit() { + function submit(event: Event) { + event.preventDefault(); if (msg.length <= 2000) { socket?.sendMessage(data.currentUser, msg); if (textareaRef) textareaRef.style.height = '40px';