fix: Make the damn textbox stop unfocusing on message submit
This commit is contained in:
parent
e34fa995d3
commit
a7f0df468d
2
TODO.md
2
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
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user