Hey guys, I know this post is solved but for those of you who have this problem with the currency input mask and cannot solve it with Nick's suggestion(happened to me), I wrote a small jQuery script to work this issue around. I placed the JS node inside the OnRender lifecycle hook:
$('.your-input-class.masked-value').one('keyup', function(e){
if(e.keyCode === 8 || e.keyCode === 46) {
if($(this).val() === 0 || $(this).val() === undefined || $(this).val() === "") {
// Set input val attr
$(this).attr('value', "0");
$(this).val('$0.00');
// Set hidden input val attr
var hiddenInput = $(this).closest('.currency-mask').find('.vanilla-input').find('.your-input-class');
hiddenInput.attr('value', "0");
hiddenInput.val(0);
}
}
});
What this does is detecting an input clear by backspacing or deleting the input value. This solution is fairly new so it might need some tweeks on your side. Also make sure that you call your OnChange action at the end of the keyup event.
Cheers,
Fred.