powmedia / backbone-forms

Form framework for BackboneJS with nested forms, editable lists and validation
MIT License
2.17k stars 413 forks source link

'PreviousValue' only set on key presses #278

Open exussum12 opened 11 years ago

exussum12 commented 11 years ago

Change events are not fired when a populated form is deleted all in one go, For example by Control A, Delete

Jsfiddle: http://jsfiddle.net/dW2Qu/79/

If you delete 1 by 1 it works great, If you delete the all chars in one go, No change is fired.

Im not sure how I would write a qunit test for this sorry.

philfreo commented 11 years ago

Could you add a testcase that fails without your patch, but passes with it?

philfreo commented 11 years ago

Does #224 fix your issue?

exussum12 commented 11 years ago

Added a test, Its the same bug yes, #224 checks previous value though rather than the existence of the event being fired. It helped with what test to add though. There is already a Control A delete test in there, which should be kept as well. (as they test at different times, this tests the first time, The other one tests after the value has already been changed )

220 is the issue it directly fixes