feat(panel): dismiss when clicking outside
Close the panel when a mouse-down is sent to another app. The panel observes didResignKey for clicks that make another window key, and installs a transient global mouse-down monitor while visible for clicks outside an open popover or when the panel was not made key. Global monitors ignore events sent to this app, so clicks in the panel and its popover are unaffected; the event is discarded and the monitor is removed on close. Add the dialog guards for recursive close and document the monitor in ADR-009, the architecture, the privacy table and the user guide.\n\nVerified: make verify green; inside clicks keep the panel open; outside clicks close it with closeWithEscape on and off; an outside click while the language popover is open closes both. Replace still works.
This commit is contained in:
1 parent
a3e544fbe4
commit
39ec191348
7 files changed
+61
-9
No files matched your search
@@ -155,3 +155,4 @@ Legend: `[ ]` open · `[~]` in progress · `[x]` done · `[!]` blocked (explain)
|
||||
2026-11-26 · Panel · Fixed dragging: `performDrag` was a no-op while the non-activating panel's app is inactive, so `WindowDragArea` now moves the window from the screen-space mouse delta. The drag surface is a full-width 56 pt header bar flush with the panel top; buttons stay clickable above it. Verified with synthetic drags from the title, top edge, empty header and grip while Finder was frontmost.
|
||||
2026-11-26 · Panel · Esc now closes the panel without a click: `TranslationPanel` becomes key on show without activating the app (`frontmostApplication` and the menu bar stay with the source app), and `keyDown` handles keyCode 53. Added the `closeWithEscape` setting (default on) and amended ADR-009.
|
||||
2026-11-26 · Panel · Markdown translations render with headings, bold/italic, inline code, lists, quotes, fenced code, rules and http/https links. `MarkdownPresentation` rejects JSON/HTML/code and only renders with the `renderMarkdown` setting (default on); Copy/Replace stay raw. Added ADR-021 and tests.
|
||||
2026-11-26 · Panel · A click outside the panel now closes it. The panel observes `didResignKey` and installs a transient global mouse-down monitor while visible; global monitors ignore events sent to this app, so panel/popover clicks are unaffected, and the monitor is removed on close. Verified: inside click keeps it open, outside click closes it with and without `closeWithEscape`, and an outside click while the language popover is open closes both.
|
||||
Reference in new issue
Block a user