macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reached

Aperta Adatta ai principianti
#1,667 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
electron, typescript
Ambito
desktop-dev

Direzione di ricerca

Inizia in electron/messageBox.ts a showSaveDialogOver (L44-56) e leggi il suo commento su #743 per vedere come una finestra proprietaria trasforma il pannello in uno sheet, poi confronta con exportDiagnosticFile in electron/ipc/handlers.ts (L1990-1994), che chiama dialog.showSaveDialog senza proprietario. Traccia come i punti di ingresso del menu e della tray raggiungono quel handler affinché la finestra attiva possa essere passata come proprietaria. Fatto quando il pannello di diagnostica è agganciato alla finestra dell’editor e resta in primo piano dopo Cmd+Tab; la verifica richiede una build macOS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

On macOS, the save panel opened by Save Diagnostics ends up under the editor window after an app switch. It can then be neither seen nor clicked.

Steps

  1. In the editor, wordmark menu → Save Diagnostics. The "Save Diagnostic File" panel opens in front.
  2. Bring another app to the front (Safari here), then come back with Cmd+Tab.

Expected: the panel stays in front of the editor, or is attached to it as a sheet.

Actual

  • The editor comes back above the panel. The window list holds the panel under the editor, invisible and out of the mouse's reach.
  • Return does nothing, since the panel is not key. The Window menu offers only Minimize, Zoom and Bring All to Front.
  • The save could only be finished through accessibility (AXPress on its Save button). The bundle was then written correctly.

Seen on 2.4.0-rc.1 (DMG), macOS 27.0.1, Mac mini M1.

Why

exportDiagnosticFile calls dialog.showSaveDialog with no owner window (handlers.ts#L1990-L1994). The other save panels go through showSaveDialogOver (messageBox.ts#L44-L56). Its comment describes exactly this trap (#743): unowned, a macOS save panel is a free-floating window that a click sends behind the editor; owned, it is a sheet on that window.

Fix direction

Open the diagnostics panel with showSaveDialogOver, owned by the window the request came from. The menu and tray entry points can pass the focused window.

Lingua principale
TypeScript
Stelle
3.7k
Fork
231
Merge medio
1g 8h
PR unite (30g)
150

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getopenscreen/openscreen

Tutte le issue di getopenscreen/openscreen

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.