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
+1
-1
@@ -35,7 +35,7 @@ the Hy-MT3 model and the target language. You can reopen setup from the menu bar
|
||||
|
||||
1. Select text in any app.
|
||||
2. Press **⌘C** twice quickly (within 500 ms).
|
||||
3. The floating panel appears near the mouse. The source app stays frontmost; the panel takes keyboard focus while it is visible so Esc and the shortcuts work immediately. Clicking the source app takes focus back.
|
||||
3. The floating panel appears near the mouse. The source app stays frontmost; the panel takes keyboard focus while it is visible so Esc and the shortcuts work immediately. Clicking the source app takes focus back. Clicking anywhere outside the panel closes it; Esc also closes it.
|
||||
4. The translation streams in. Use the language picker to change the target.
|
||||
5. Click **Copy** to put the translation on the clipboard, or **Replace** to replace the selection.
|
||||
6. **Esc** closes the panel. **⌘C** copies, **⌘↩** replaces, **⌘R** retries and **⌘,** opens Settings.
|
||||
|
||||
Reference in new issue
Block a user