fix: Rename historyNoteEditor init to activate
Alpine auto-calls init() on mount, creating the OverType editor
while the element is still display:none (scrollHeight = 0).

Assisted-by: Claude Opus 4.6 via Claude Code
change mqrmzmlsrwoqkpwqzrukqzktspwvuwwo
commit 73eac151ed9c2e2109a98c8e35b7187a35540aa0
author Alpha Chen <alpha@kejadlen.dev>
date
parent ukvmytnr
diff --git a/lib/ketchup/views/dashboard.rb b/lib/ketchup/views/dashboard.rb
index 462827c..09209a2 100644
--- a/lib/ketchup/views/dashboard.rb
+++ b/lib/ketchup/views/dashboard.rb
@@ -163,7 +163,7 @@ module Views
                       "data-task-id": ct[:id].to_s,
                       "data-value": ct[:note] || "",
                       "x-data": "historyNoteEditor",
-                      "x-init": "init()"
+                      "x-init": "activate()"
                     ) if ct[:note]
                     div(
                       class: "task-history-note-editor",
@@ -171,7 +171,7 @@ module Views
                       "data-value": "",
                       "x-data": "historyNoteEditor",
                       style: "display: none",
-                      "x-on:add-note-#{ct[:id]}.window": "show($el); init()"
+                      "x-on:add-note-#{ct[:id]}.window": "show($el); activate()"
                     ) if ct[:note].nil?
                   end
                 end
diff --git a/public/js/app.js b/public/js/app.js
index 84f4b67..bc5c51d 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -112,7 +112,7 @@ document.addEventListener("alpine:init", () => {
       el.style.display = ""
     },
 
-    init() {
+    activate() {
       const el = this.$el
       const taskId = el.dataset.taskId
       const initialNote = el.dataset.value || ""