From b03cc8066542547ded61d8e47644fa89d5b46202 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 22:24:01 -0500 Subject: [PATCH] fix(ui): default floating dialog position to bottom-left When the dialog first appears (mount) and when it switches to 'free' mode (setMode), pin it to the bottom-left corner of the viewport (left: 20px, bottom: 20px) rather than the previous bottom-right default. The header drag handler still uses left/top for the new position, so this change flows through cleanly on subsequent drags. Note: existing users with a saved pos.x/pos.y in localStorage will still see the dialog at the old transform-offset position until pos is reset in a follow-up migration (see next commit). --- src/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui.js b/src/ui.js index d5b6599..fee5988 100644 --- a/src/ui.js +++ b/src/ui.js @@ -100,7 +100,7 @@ export class Dialog { if (initialMode === 'free') { root.style.bottom = '20px'; - root.style.right = '20px'; + root.style.left = '20px'; if (initialPos.x || initialPos.y) { root.style.transform = `translate(${initialPos.x}px, ${initialPos.y}px)`; } @@ -124,7 +124,7 @@ export class Dialog { this.root.style.right = ''; if (mode === 'free') { this.root.style.bottom = '20px'; - this.root.style.right = '20px'; + this.root.style.left = '20px'; } else if (anchorInfo && anchorInfo.canAnchor) { this._positionAnchored(anchorInfo.rect); } else {