From d9444f18dd54b229082f72a5c94c85fead7d97e2 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 13 Feb 2025 17:48:37 -0600 Subject: [PATCH] House seems to expect a placeholder value Fixes that the placeholder would display `null` if you clear the content while editing a comment. See also: https://fizzy.37signals.com/buckets/693169850/bubbles/999008493#comment_994776744 --- app/views/comments/edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/comments/edit.html.erb b/app/views/comments/edit.html.erb index 63c14dcd2..3a8338d13 100644 --- a/app/views/comments/edit.html.erb +++ b/app/views/comments/edit.html.erb @@ -2,7 +2,7 @@
<%= form_with model: [@bubble.bucket, @bubble, @comment], class: "flex flex-column gap full-width", data: { controller: "form paste", action: "keydown.ctrl+enter->form#submit:prevent keydown.meta+enter->form#submit:prevent keydown.esc->form#cancel:stop paste->paste#pasteFiles" } do |form| %> - <%= form.markdown_area :body, class: "input comment__input", required: true, autofocus: true %> + <%= form.markdown_area :body, class: "input comment__input", required: true, autofocus: true, placeholder: new_comment_placeholder(@bubble) %>
<%= form.button class: "btn btn--reversed txt-small", type: :submit do %> <%= image_tag "check.svg", aria: { hidden: true }, size: 16 %>