Make sure Form.reset always returns a reference to the receiver element. [#309 state:resolved] (Phil, kangax)
This commit is contained in:
parent
97fc24a0b2
commit
dc9d274d89
|
@ -1,3 +1,5 @@
|
|||
* Make sure Form.reset always returns a reference to the receiver element. [#309 state:resolved] (Phil, kangax)
|
||||
|
||||
* Escape ":" and "." characters when doing contextual CSS selection in browsers that support querySelectorAll. [#559 state:resolved] (fxtentacle, Andrew Dupont)
|
||||
|
||||
* Ensure the `target` property on events is never undefined in IE. [#383 state:resolved] (Mathias Karstädt, Diego Perini, Andrew Dupont)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
var Form = {
|
||||
reset: function(form) {
|
||||
$(form).reset();
|
||||
form = $(form);
|
||||
form.reset();
|
||||
return form;
|
||||
},
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@ new Test.Unit.Runner({
|
|||
this.assertEqual("4", $F("input_enabled"));
|
||||
},
|
||||
|
||||
testFormReset: function() {
|
||||
this.assertRespondsTo('reset', Form.reset('form'));
|
||||
},
|
||||
|
||||
testFormElementEventObserver: function(){
|
||||
var callbackCounter = 0;
|
||||
var observer = new Form.Element.EventObserver('input_enabled', function(){
|
||||
|
|
Loading…
Reference in New Issue