Skip to content

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

@wojcikstefan

Description

@wojcikstefan

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions