Fix series note changes not saving
`this.$el` doesn't resolve to the component root in Alpine methods —
querySelector returned null and note edits were silently dropped.
Assisted-by: Claude Sonnet 4.6 via Claude Code
diff --git a/public/js/app.js b/public/js/app.js
index 27375cf..02969a0 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -132,15 +132,12 @@ document.addEventListener("alpine:init", () => {
},
save() {
- this.editing = false
- this.$dispatch("stop-editing")
-
const params = new URLSearchParams()
if (this.count !== initialCount) params.set("interval_count", this.count)
if (this.unit !== initialUnit) params.set("interval_unit", this.unit)
if (this.shared !== initialShared) params.set("shared", this.shared ? "1" : "0")
- const noteEl = this.$el.querySelector("#series-note-detail")
+ const noteEl = document.querySelector("#series-note-detail")
if (noteEl?._overtype) {
const note = noteEl._overtype.getValue().trim()
if (note && note !== (noteEl._initialNote || "").trim()) {
@@ -148,6 +145,9 @@ document.addEventListener("alpine:init", () => {
}
}
+ this.editing = false
+ this.$dispatch("stop-editing")
+
if (params.toString() === "") return
fetch(`/series/${seriesId}`, {