From 7e66da8defa107a235f9dacf7ae6f4a523fbe2eb Mon Sep 17 00:00:00 2001 From: mAi Date: Mon, 25 May 2026 15:12:10 +0200 Subject: [PATCH] =?UTF-8?q?mAi:=20#92=20-=20t-paliad-261=20=E2=80=94=20sub?= =?UTF-8?q?mission-draft=20autosave=20focus=20+=20click-variable-in-previe?= =?UTF-8?q?w=20jump?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related editor polish fixes. (A) Autosave-refresh focus preservation paintVariables() replaces every input via innerHTML, blowing away the focused-input reference and dropping the cursor mid-edit. Fix: capture the active variable input's data-var key + selectionStart/ End/Direction before the repaint, restore on the new element after (by data-var lookup + setSelectionRange). Cursor stays put across autosave, rename, and reset cycles. Works for and