Skip to content

Commit

Permalink
Dialog.js bug fix (selecting submit inputs inappropriately)
Browse files Browse the repository at this point in the history
  • Loading branch information
Winton Welsh committed May 2, 2008
1 parent 93a8786 commit ff1b411
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dialog.js
Expand Up @@ -284,7 +284,10 @@ var Dialog = Base.extend({
var json = Json.evaluate(r);
this.fireEvent('onRespond', [ this.el.dialog, json ]);
if (json.errors) {
var inputs = $ES('input, textarea', this.el.form).sort(function(a, b) {
var inputs = $ES('input, textarea', this.el.form).filter(function(item) {
return (item.getProperty('type') != 'submit');
});
inputs = inputs.sort(function(a, b) {
return a.getProperty('tabindex').toInt() - b.getProperty('tabindex').toInt();
});
var index = 1000;
Expand Down

0 comments on commit ff1b411

Please sign in to comment.