gwendall/way.js

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

Opened this issue · 1 comments

can not save the element input text="number"

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