electron-spellchecker icon indicating copy to clipboard operation
electron-spellchecker copied to clipboard

Unsubscribing on unload event

Open Camyll opened this issue 7 years ago • 1 comments

I am currently using a 'beforeunload' event to track when I should unsubscribe from the spellchecker and the contextMenuListener. I am unsubscribing from these events because if I do not and then I resubscribe, it has led to crashes in the past.

The app occasionally receives beforeunload events that get cancelled, leaving me with no spellchecker or menu.

  1. Is there a better event to be unsubscribing on?
  2. In the latest version or future versions (I believe I'm on 1.6) will there be an automatic cleanup for these events?
  3. Has anyone else had trouble with this sort of issue? If it's a more widespread problem, I would love to contribute to a solution for all.

Camyll avatar Sep 18 '17 17:09 Camyll

How about 'unload' event? It's fired after beforeunload and is not cancelable.

Anrock avatar Apr 26 '18 11:04 Anrock