rem: return $(form).getElements().find(function(element) { return element.type != 'hidden' && !element.disabled && ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); 
add: var elements = $(form).getElements().findAll(function(element) { return 'hidden' != element.type && !element.disabled; }); var firstByIndex = elements.findAll(function(element) { return element.hasAttribute('tabIndex') && element.tabIndex >= 0; }).sortBy(function(element) { return element.tabIndex }).first();  return firstByIndex ? firstByIndex : elements.find(function(element) { return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); 
context:   findFirstElement: function(form) {    return $(form).getElements().find(function(element) {      return element.type != 'hidden' && !element.disabled &&        ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());    });  },
meta: 9100	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9100/2d4247a14ff4ce25ad80cbc65b787dfde7ddb16e/prototype.js/buggy/typo3/contrib/prototype/prototype.js