Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submitting the form by pressing "enter" on a Number editor doesn't work #537

Open
wojcikstefan opened this issue Dec 30, 2016 · 0 comments

Comments

@wojcikstefan
Copy link

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 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.

https://jsfiddle.net/s1h0s5mm/1/

glenpike pushed a commit to glenpike/backbone-forms that referenced this issue Dec 30, 2016
Remove the onKeyPress handler from the number field as HTML5
number doesn't allow non-numeric input.
Add "TODO" test - it won't render field with a non-numeric value.
Update example with number field.
Fix bug with Form#handleEditorEvents tests running standalone -
async in qunit.
glenpike pushed a commit to glenpike/backbone-forms that referenced this issue Dec 30, 2016
Remove the onKeyPress handler from the number field as HTML5
number doesn't allow non-numeric input.
Add "TODO" test - it won't render field with a non-numeric value.
Update example with number field.
Fix bug with Form#handleEditorEvents tests running standalone -
async in qunit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant