Skip to content

some onchange events are "eaten" #44

@poulet1212

Description

@poulet1212

What?
If you are editing an input value and click on the del button or the rub button, or even if you select another field with a left click , the currently edited field will not trigger any "change" event.

how?
if u call .maskMoney() on an obj, say: $("#myInput").maskMoney();
Then you will receive parcially the "change" event from that object ( for exemple: $('#myInput').bind('change',function() )

The fix:

around line 78, after:

else if (k==37||k==39) { // left arrow key or right arrow key
    return true;
}

add this condition to take care of the del and rub buttons, and make sure "change envent will be triggered":

else if (k==8||k==46) { //8: rub, del: 46
    clearDirt();
    $(this).change();
    return true;
}

Then look at the blur() method around 170 and add to the end of blur():

//loosed focus, bubble change event to other listeners if is dirty
if(dirty){
    clearDirt();
    $(this).change();
}

Thanks to fix this on trunk.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions