x-editable + maskedinput 在输入时返回下划线但在点击时不返回

x-editable + maskedinput returning underscores on enter but not on click

x-editable + maskedinput 在输入时从 maskedinput 返回下划线,但当我单击时它不会。关于如何解决这个问题有什么想法吗?

JSFiddle:

jQuery 图书馆的:

HTML:

<a href="#" data-pk="1">1</a>

JS:

$('a').editable({
    type: 'text',
    name: 'username',
    tpl: '<input type="text" id ="zipiddemo" class="mask form-control input-sm dd" style="padding-right: 24px;">'
});

$(document).on("focus", ".mask", function () {
    $(this).mask("?999");
});

JSFiddle:

HTML:

<a href="#" data-pk="1">1</a>

JS:

$('a').editable({
    type: 'text',
    name: 'username',
    tpl: '<input type="text" id ="zipiddemo" class="mask form-control input-sm dd" style="padding-right: 24px;">',
    display: function(value, response) {
        return false;
    },
    success: function(response, newValue) {
        $(this).html(newValue.replace(/_/g, ''));
    },
});

$(document).on("focus", ".mask", function() {
    $(this).mask("?999");
});