theia icon indicating copy to clipboard operation
theia copied to clipboard

bug: secondary window cannot be reopened after closing it

Open vladarama opened this issue 1 year ago • 4 comments

Bug Description:

In the browser application, we cannot reopen the same secondary window after closing it. The only way to reopen the file is to reload the application. Note: this bug is only present on the browser app, the electron app works well.

Demo: secondary window not reopening

Steps to Reproduce:

  1. Open Theia browser application.
  2. Install the drawio extension.
  3. Create a new test.drawio file and open the file.
  4. Move the view to a secondary window by pressing the button.
  5. Close the secondary window.
  6. Try opening test.drawio, it will not open.

Additional Information

  • Operating System: Windows 10
  • Theia Version: 1.45

vladarama avatar Dec 27 '23 15:12 vladarama

@tsmaeder

JonasHelming avatar Dec 27 '23 16:12 JonasHelming

Note that the window remains open in the "SecondaryWindow" section in the "Open Editors" view. When clicking the close button in the "Open Editors" view, the file can be opened again.

tsmaeder avatar Dec 27 '23 16:12 tsmaeder

@tsmaeder Good catch, I didn't spot that. I still think that the behavior could be improved. Having to close the secondary-window from the Open Editors before being able to reopen the file is not very intuitive for users. Any thoughts ?

vladarama avatar Dec 27 '23 17:12 vladarama

@vladarama this is definitely a bug.

tsmaeder avatar Dec 27 '23 22:12 tsmaeder

@tsmaeder Just a reminder of this, it might play a role in your current work on detachable editors!?

JonasHelming avatar Mar 13 '24 09:03 JonasHelming

Turns out we just never call ApplicationShell.closeWidget() in the browser case. The call got lost in the refactoring to enable secondary windows in electron.

tsmaeder avatar Mar 14 '24 10:03 tsmaeder