Open wojcikstefan opened 7 years ago
The implementation of editors.Number.onKeyPress is faulty and prevents the form from being submitted by pressing the "enter" key.
editors.Number.onKeyPress
Currently, the newline character \r gets appended to newVal in https://github.com/powmedia/backbone-forms/blob/master/src/editors/number.js#L50, which makes the numeric test fail a few lines below, which in turn results in the event.preventDefault(); call.
\r
newVal
numeric
event.preventDefault();
https://jsfiddle.net/s1h0s5mm/1/
The implementation of
editors.Number.onKeyPress
is faulty and prevents the form from being submitted by pressing the "enter" key.Currently, the newline character
\r
gets appended tonewVal
in https://github.com/powmedia/backbone-forms/blob/master/src/editors/number.js#L50, which makes thenumeric
test fail a few lines below, which in turn results in theevent.preventDefault();
call.https://jsfiddle.net/s1h0s5mm/1/