fix: suppress height reporting during note editing to prevent graph rebuilds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Guilhem
2026-02-25 10:55:15 +00:00
parent 2661202747
commit 8897313c75
@@ -26,9 +26,9 @@
// Derive border class from outline (e.g. "outline-yellow-300" → "border-yellow-300")
let borderColorClass = $derived(noteColorConfig.outline.replace(/outline-/g, 'border-'))
// Measure height and report to parent
// Measure height and report to parent (skip while editing to avoid full graph rebuilds)
$effect(() => {
if (containerElement) {
if (containerElement && !editing) {
const height = containerElement.clientHeight
onHeightChange(height)
}
@@ -38,6 +38,7 @@
$effect(() => {
if (!containerElement) return
const observer = new ResizeObserver((entries) => {
if (editing) return
for (const entry of entries) {
onHeightChange(entry.contentRect.height)
}