Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[electron] The 'unload' event listener on the window is never invoked inside electron #6530

Closed
kittaakos opened this issue Nov 12, 2019 · 0 comments · Fixed by #6532
Closed
Labels
bug bugs found in the application electron issues related to the electron target

Comments

@kittaakos
Copy link
Contributor

Description

Try to add some logging, you can see, it works from the browser example, but not from the electron on. The unload listener is not invoked when I refresh the browser window with the electron example. I bet this is related to #6499.

Problematic code:

window.addEventListener('unload', () => {
this.stateService.state = 'closing_window';
this.layoutRestorer.storeLayout(this);
this.stopContributions();
});

Reproduction Steps

OS and Theia version:

Diagnostics:

@akosyakov akosyakov added bug bugs found in the application electron issues related to the electron target labels Nov 12, 2019
kittaakos pushed a commit that referenced this issue Nov 12, 2019
 - `unload` was not triggered in electron. (See: electron/electron#7278 (comment))
 - Exposed `ShellLayoutRestorer` APIs.
 - Added logging.
 - Fixed typos.

Closes #6530.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Nov 12, 2019
 - `unload` was not triggered in electron. (See: electron/electron#7278 (comment))
 - Exposed `ShellLayoutRestorer` APIs.
 - Added logging.
 - Fixed typos.

Closes #6530.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Nov 12, 2019
 - `unload` was not triggered in electron. (See: electron/electron#7278 (comment))
 - Exposed `ShellLayoutRestorer` APIs.
 - Added logging.
 - Fixed typos.

Closes #6530.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Nov 12, 2019
 - `unload` was not triggered in electron. (See: electron/electron#7278 (comment))
 - Exposed `ShellLayoutRestorer` APIs.
 - Added logging.
 - Fixed typos.

Closes #6530.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Nov 12, 2019
 - `unload` was not triggered in electron. (See: electron/electron#7278 (comment))
 - Exposed `ShellLayoutRestorer` APIs.
 - Added logging.
 - Fixed typos.

Closes #6530.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
kittaakos pushed a commit that referenced this issue Nov 13, 2019
 - `unload` was not triggered in electron. (See: electron/electron#7278 (comment))
 - Exposed `ShellLayoutRestorer` APIs.
 - Added logging.
 - Fixed typos.

Closes #6530.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
akosyakov pushed a commit to akosyakov/theia that referenced this issue Feb 24, 2020
 - `unload` was not triggered in electron. (See: electron/electron#7278 (comment))
 - Exposed `ShellLayoutRestorer` APIs.
 - Added logging.
 - Fixed typos.

Closes eclipse-theia#6530.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application electron issues related to the electron target
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants