Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 411068

Summary: [Dialog] Multiple dialogs can be created and renders the dialog unusable
Product: [ECD] Orion Reporter: Gabriel Luong <gabriel.luong>
Component: ClientAssignee: Gabriel Luong <gabriel.luong>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, mamacdon, simon_kaegi
Version: 3.0Flags: simon_kaegi: review+
mamacdon: review+
Target Milestone: 3.0 RC3   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Gabriel Luong CLA 2013-06-18 16:44:41 EDT
To test:
1. Open "Find File Named" via Ctrl+Shift+f
2. Repeat (1) one or more times
3. Try to interact with the dialog
Comment 1 Gabriel Luong CLA 2013-06-18 16:51:30 EDT
Candidate patch - I added an id to the dialog and check if the dialog is in the dom, and don't allow any other dialogs to initialize if so.

https://github.com/gabrielluong/orion.client/commit/4f03bf043cd3d7498883fd87909821d20242d58b

Some more optimizations can probably be made since the callback in globalCommands.js#openResourceDialog() wil retrieve the favourites and progress service before initializing the open resource dialog.

I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL
Comment 2 Mark Macdonald CLA 2013-06-19 11:51:23 EDT
(In reply to comment #1)
We can't do the check in dialog.js, as there is at least 1 place in Orion where open 2 dialogs on layered top of each other. (on the Site editor page, click "Convert to self hosting", then "Browse...") Admittedly it is not the greatest workflow, but we need to support it at least for now.

Can we make this singleton behavior opt-in, and done on a per-dialog basis? Or maybe fix OpenResourceDialog so that multiple instances of it can be open without interfering with each other?
Comment 3 Gabriel Luong CLA 2013-06-19 23:03:10 EDT
https://github.com/gabrielluong/orion.client/commit/7e71bcb5669c9723ef20d42b4c03241863822ac8

I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL
Comment 4 Mark Macdonald CLA 2013-06-21 12:07:31 EDT
Pushed
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=884722d

This also fixes a similar problem with the Ctrl+H (Find in Files) dialog. Note that if you are determined to get into trouble, you can still open both types of dialog simultaneously.