diff --git a/src/App.svelte b/src/App.svelte index 50e502e..427360e 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -99,6 +99,10 @@ // set on open, editable in the header, blank → heading-derived fallback. let documentName: string = $state(loadDocName()); + // Width of the hidden mirror span (below), so the title input grows/shrinks + // with its text instead of sitting in a fixed-width box. + let docNameSizerWidth = $state(0); + // Shown in the empty title field: what an actual save would name the file. // Only computed while the field is blank (otherwise the placeholder is hidden, // so we skip the per-transaction getJSON). @@ -625,23 +629,29 @@ {/snippet} -
+
0}> - e.key === 'Enter' && (e.currentTarget as HTMLInputElement).blur()} onblur={() => (documentName = documentName.trim())} /> + .odt +