diff --git a/app/views/cards/comments/reactions/create.turbo_stream.erb b/app/views/cards/comments/reactions/create.turbo_stream.erb index 7ae1f1daa..7ac4b61df 100644 --- a/app/views/cards/comments/reactions/create.turbo_stream.erb +++ b/app/views/cards/comments/reactions/create.turbo_stream.erb @@ -1 +1,3 @@ -<%= turbo_stream.append([ @comment, :reactions ], partial: "cards/comments/reactions/reaction", locals: { reaction: @reaction }) %> +<%= turbo_stream.replace([ @comment, :reacting ]) do %> + <%= render "cards/comments/reactions/reactions", comment: @comment.reload %> +<% end %> diff --git a/app/views/cards/comments/reactions/new.html.erb b/app/views/cards/comments/reactions/new.html.erb index e847acfbe..38c6daf98 100644 --- a/app/views/cards/comments/reactions/new.html.erb +++ b/app/views/cards/comments/reactions/new.html.erb @@ -2,7 +2,7 @@ <%= form_with model: [ @comment.card, @comment, Reaction.new ], class: "reaction reaction__form expanded", html: { aria: { label: "New reaction" } }, - data: { controller: "form reaction-emoji", turbo_frame: dom_id(@comment, :reacting), action: "keydown.esc->form#cancel submit->form#preventEmptySubmit turbo:submit-end->form#reset" } do |form| %> + data: { controller: "form reaction-emoji", turbo_frame: dom_id(@comment, :reacting), action: "keydown.esc->form#cancel submit->form#preventEmptySubmit" } do |form| %>