I finally get it working by specifiying custom focus and open events
in the dialog settings. Here they are :
// Setting new tabindex to input elements
focus: function(e, ui) {
$(e.target).find(':input:visible').each(function(i) {
$(this).attr('tabindex', 3+i);
});
}
// Focusing first element of the form
,open: function() {
$(this).find(':input[tabindex=3]').focus();
}
What it does is reassigning new tabindex values to input fields in the
modal box (starting with 3000 -big enough to be sure it will not mess
with allready defined tabindex), and then focusing the first one
(tabindex = 3).
Tabbing through fields now works
On 15 mai, 02:31, gearb0x beer...@gmail.com wrote:
I've got the same problem with FF3, seems to work fine in IE7
Any luck?
On May 10, 11:59 pm, Pixelastic timcc.pe...@gmail.com wrote:
Hello,
I'm opening a dialog box using the jQuery UI dialog methods, this box
will display a form, and I would like to autofocus the first element.
I'm also modifying tabindex of the different form fields of this new
form in order to make them a lot higher than those of the original
page, and thus navigate through the form using only the tab key.
The issue is that I can correctly change tabindex values, and
correctly focus the first element but pressing tab will not focus the
next element in my newly added form but seems to act as I was focusing
the first tabindexable element of my original page.
I also note that manually focusing (ie. clicking) the element cause no
problem, new tab index order is respected.
Does anyone have a clue where it can came from ? Something seems to be
messed up in the tabindex order.
Tested on FF3, maybe the browser only update tabindex order on
manual focus and not when modifying attributes ?