Setting of Focus to first button on display of prompt.
November 28, 2007 - 2:48am — knave
| Project: | Impromptu |
| Version: | 1.0 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
If you tie the prompt event to an input button, the element focus is still on the old button (which was covered by the fade layer).
If the user press the SpaceBar key, it will resubmit the same event again, thus creating a javascript error for Impromptu (tested on FireFox 2.0).
You can try adding this line:
jqi[o.show](o.promptspeed,o.loaded);
jQuery('#'+ o.prefix +"buttons > button:first-child").focus(); //insert this.
return jqi;
It ensures that on load, the first button will be focused (only on FireFox 2). IE7 requires a TAB key press.