| Summary: | [client] directory prompter is not responsive to the enter key | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> |
| Component: | Client | Assignee: | Nayna Jain <jainnayna> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mamacdon, simon_kaegi, susan |
| Version: | 0.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Susan McCourt
I just realized that the enter key is responsive if the focus is not in the tree. So it's probably a matter of hooking enter on the tree in the same way that _OrionDialogMixin hooks it on the main domNode. Note also that if you do dismiss it via the enter key (when focus is not on the tree), there are errors in the console. exception in animation handler for: onEnd fx.js (line 153) TypeError: this._fadeOutDeferred is undefined this._fadeOutDeferred.callback(true); Don't worry too much about these. We are getting dojo dialog animation errors pretty badly on FF4/dojo 1.6.1 and I'm going to look into a more general solution for that. The NewSiteDialog has this issue too: ENTER does nothing when focus is in the text input field. I noticed this code in _OrionDialogMixin: > dojo.connect(this, "onKeyPress", dojo.hitch(this, function(evt) { > if (evt.keyCode === dojo.keys.ENTER) { > this._onSubmit(); > } > })); Attaching a listener to the widget itself seems to only deliver DOM events from the widget's domNode, but not bubbled events from child DOM nodes. If we explicitly listen to the domNode and use the DOM-style "onkeypress" event type instead: > dojo.connect(this.domNode, "onkeypress", dojo.hitch(this, function(evt) { > if (evt.keyCode === dojo.keys.ENTER) { > this._onSubmit(); > } > })); ... the listener is called with the bubbled event, so _onSubmit() is invoked on ENTER. (In reply to comment #2) My last comment was wrong. The reason NewSiteDialog didn't work was an error in my code. Unrelated to the directory prompter issue. i'll take this since it's a general problem in the mixin. I noticed the same problem in the link dialog today. never mind, this does seem to be specific to the dir prompter. (Link dialog is working). Working now |