Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Tech Debt] Electron app should warn about unsaved changes before closing

Aperta
#533 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
electron, javascript
Ambito
desktop

Direzione di ricerca

Start by reading the close handler in packages/electron-wrapper/main.js:95-99 and the surrounding Electron window lifecycle code. Determine how the app can detect unsaved changes and present a native confirmation without breaking the force-close workaround. Done means closing the desktop app warns when changes exist and closes directly when there are none or the user confirms.

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

Descrizione

tech-debt

Description

The Electron desktop app currently bypasses all beforeunload confirmations to fix window close issues. This means users won't get unsaved changes warnings when closing the app.

Location

win.on('close', (event) => {
  event.preventDefault();
  win.webContents.executeJavaScript('window.onbeforeunload = null;', true)
    .finally(() => {
      win.destroy();
    });
});

Found In

PR #531 - fix(#529): Add ad-hoc code signing for macOS Electron builds

Suggested Improvement

A more sophisticated approach could:

  1. Check if there are actually unsaved changes before bypassing
  2. Show a native Electron dialog instead of the web one
  3. Only force-close if user confirms or there are no changes

Priority

Low - The web browser version still has the warning. This only affects desktop app users.

Lingua principale
TypeScript
Stelle
1
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 jcollard/LuaInTheWeb

Tutte le issue di jcollard/LuaInTheWeb

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.