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

Bug 413189

Summary: Can't convert to self hosting site
Product: [ECD] Orion Reporter: Bogdan Gheorghe <gheorghe>
Component: ClientAssignee: Gabriel Luong <gabriel.luong>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gabriel.luong, mamacdon
Version: 3.0   
Target Milestone: 4.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Bogdan Gheorghe CLA 2013-07-17 13:48:25 EDT
I20130715-2230

I go to create a new self hosting site, I select where I checked out the client code and I get nothing.

Looking at the console log, I get :

"Cannot read property 'classList' of undefined" : built-site.js:1177
Comment 1 Gabriel Luong CLA 2013-07-18 11:20:51 EDT
Commented out my patch for autodismiss of dialogs (411740). That fixed convert to self-hosting. 

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=5e5ee2cbf7301fd5fe0d7917782db58abb1510ab
Comment 2 Gabriel Luong CLA 2013-07-18 11:21:18 EDT
resolved
Comment 3 Mark Macdonald CLA 2013-07-18 14:42:14 EDT
The workflow in this bug is:
1. Open "Convert To Self Hosting dialog"
2. Click Browse. A "Choose Folder" dialog opens on top of it
3. Click OK to Choose Folder
4. Click OK to the remaining dialog

I think the problem here may have been in Step 3, when you click on the Choose Folder dialog, the click event bubbles up to the autoDismiss listener and it decides to dismiss the parent "Convert To Self Hosting" dialog. 

Then, by the time you say OK to the Choose Folder dialog, the parent dialog has already been destroyed.

We could try making the autoDismiss handler aware of the child dialog, via the excludeNodes parameter. The call order here is tricky, since the child dialog's elements are apparently not created until you actually click the Browse button on the parent dialog.

So I guess we'd have to make addAutoDismiss return a handle, which the caller can use to update its excludeNodes. When a child dialog is added (via dialog.js _addChildDialog), we would add its frame into the auto-dismiss excludeNodes so it can be clicked without killing its parent.