diff --git a/chat/components/chat.templ b/chat/components/chat.templ index ec10136..f2d02fe 100644 --- a/chat/components/chat.templ +++ b/chat/components/chat.templ @@ -42,8 +42,7 @@ templ Chat(messages []chat.Message, cfg Config) { placeholder="Chat..." autocomplete="off" data-bind="chatMsg" - data-on:keydown.stop="" - data-on:keydown.key_enter={ datastar.PostSSE("%s", cfg.PostURL) } + data-on:keydown__stop={ "evt.key === 'Enter' && " + datastar.PostSSE("%s", cfg.PostURL) } /> } else { }