Hotwire Discussion

turbo:submit-start->chat#attemptSend dosent stop the form from being submitted

Hi, so i have this basic form

    <%= form_for [@conversation,],
                       html: {data: { controller: "reset-form chat", action: "turbo:submit-end->reset-form#reset turbo:submit-start->chat#attemptSendMessage"}} do |f| %>

and the controller

    attemptSendMessage(e) {
        if(this.inputTarget.value.trim().length === 0) {
        } else {

the e.preventDefault() is being executed but the form is still gets submitted

Any ideas why?

When i click enter on the keyboard this behavior occurs