Community
Participate
Working Groups
FF4. Hit "T" to open the "Open Resource" dialog Hit Esc. Next time you hit "T" you'll see 3 errors in the console: exception in animation handler for: beforeBegin fx.js (line 153) [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLInputElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost:8080/org.dojotoolkit/dijit/_base/focus.js :: <TOP_LEVEL> :: line 48" data: no] console.error(e); fx.js (line 154) _t.curve is undefined [Break On This Error] var value = _t.curve.getValue(_t._getStep()); This is very similar to bug 345292. The focus node at the time you try to open the dialog again affects whether you get the error or not.
Changing title of bug. The red herring here was that only the open resource dialog is opened via key binding and I noticed this bug just after adding keybindign support. As a test, I added a keybinding to open the link dialog, and it does not exhibit the problem. So the problem is specific to OpenResourceDialog.
It turns out that this one is simply a specific case of bug 345292. It seems I must have fixed every dialog except OpenResource, because it's workarounds are different than the other ones. I'm afraid I'm going to have to pass this one onto Mark. We no longer launch open resource from an image, so the way to get this to happen is to launch open resource by keybinding outside of the editor. (Use "T"). If you set focus somewhere before reopening open resource, everything is ok. So steps are Hit "T" Hit Esc [Click on checkbox in navigator first?] if yes, hit "T" again, no problem if no, hit "T" again, you see the problem. So I think that some of the old workarounds involving focus nodes need to be removed from this dialog. I tried the easiest thing which was to remove the dialog.refocus = false workaround and that was not enough. Since the timing of onHide has changed, I tried putting the clearTimeout code in the hide method, after the animation deferred completed. That did not work either. Then I started to get nervous that I didn't understand the code enough to go further. I don't think this bug is critical given it only affects open resource, but if you have time to investigate it would be worth a look....
OpenResourceDialog is unlike the other dialogs in that it creates a dijit.Dialog as a child widget, rather than extending dijit.Dialog. There's really no reason for this. I refactored it to extend from dijit.Dialog instead, and it does fix the problem described in Comment 2. Will release the fix in 0.3.
http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=a57be4b36d0eb8e2e49a162c8c4b7ca57f695069 Refactored as described in Comment 3, and removed old workarounds that didn't do anything.