This project is archived and is in readonly mode.

#498 ✓resolved
A. Gideonse

OnElementPass has parameter 'undefined'

Reported by A. Gideonse | January 24th, 2011 @ 01:49 PM | in 1.3.1.1

In rare occasions (complex forms?) the 'OnElementPass'-call of Form.Validator returns 'undefined' instead of the field passed. Although I could not create a simple form to duplicate this behavior (the actual form is rather complex and the problem occurs with a 'select'-field), I did fix the problem by making a small modification to the MooTools.More files:

Old version:

field.addClass('validation-passed').removeClass('validation-failed');
this.fireEvent('elementPass', field);

New version:

field.addClass('validation-passed').removeClass('validation-failed');
this.fireEvent('elementPass', [field]);

A few tryouts learned me that 'field' is defined within the MooTools.More methods, but is not passed correctly to the defined onElementPass-method (causing it to show up as 'undefined').

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

Pages