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

can not save the element <input text="number"> #78

Open
dmh19900611 opened this issue Sep 20, 2017 · 1 comment
Open

can not save the element <input text="number"> #78

dmh19900611 opened this issue Sep 20, 2017 · 1 comment

Comments

@dmh19900611
Copy link

dmh19900611 commented Sep 20, 2017

can not save the element input text="number"

@generals-space
Copy link

generals-space commented Oct 13, 2017

In the source code, you can just search WAY.prototype.getValue, and add number type to the getter.INPUT function. like that

INPUT: function() {
    var type = w.dom(element).type();
    // here add your type
    if (_w.contains(['text', 'password', 'number'], type)) {
    return w.dom(element).val();
    }
    if (_w.contains(['checkbox', 'radio'], type)) {
    return w.dom(element).prop('checked') ? w.dom(element).val() : null;
    }
},

also in WAY.prototype.setValue.

Haven't read the source code actually, I don't know the reason to specify the type of input ele. Maybe you can just add A else, I think. @gwendall

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

2 participants