Skip to content

Conversation

@tsmaeder
Copy link
Member

What it does

There were two problems:

  1. A listener for the 'close' even on secondary windows went missing in the browser case when introducing secondary window support for Electron
  2. The code uses a listener for the 'close' event on the secondary window. However, this event does not exist. So basically, this never worked 🤦

Fixes #13214

Contributred on behalf of STMicroelectronics.

How to test

Open and close secondary windows in both the browser and electron case. Make sure there are no exceptions and documents can be reopened. I used the hediet.vscode-drawio extension from open-vsx to test.

Follow-ups

Review checklist

Reminder for reviewers

- Refactored to close widget upon browser-case close windows
- Seems 'close' event is no longer fired in browser case. Using 'unload'

Fixes eclipse-theia#13214

Contributred on behalf of STMicroelectronics.

Signed-off-by: Thomas Mäder <[email protected]>
@tsmaeder tsmaeder requested a review from rschnekenbu March 20, 2024 08:33
Copy link
Contributor

@rschnekenbu rschnekenbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me!
I tested with the same extension, on electron and browser. No issue to open in new window /close/reopen a drawio editor on both versions.

@tsmaeder tsmaeder merged commit c500d0e into eclipse-theia:master Mar 21, 2024
@jfaltermeier jfaltermeier added this to the 1.48.0 milestone Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

bug: secondary window cannot be reopened after closing it

3 participants