It seems like there's a bug with Form.focusFirstElement. If I have a
submit button at the top of my form, it's selected first, rather than
an input field. Should prototype.js be changed from:
findFirstElement: function(form) {
return $(form).getElements().find(function(element) {
return element.type != 'hidden' && !element.disabled &&
['input', 'select',
'textarea'].include(element.tagName.toLowerCase());
});
},
to:
findFirstElement: function(form) {
return $(form).getElements().find(function(element) {
return element.type != 'hidden' && element.type != 'submit' &&
element.type != 'button' && element.type != 'reset' &&
!element.disabled &&
['input', 'select',
'textarea'].include(element.tagName.toLowerCase());
});
},
?
Thanks,
Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---