digitalBush/jquery.maskedinput — Issue #73: Masked field gets repopulated with previous input on focus
Author: JohnIdol
Created: 2012-02-21 17:43:20+00:00
State: open

I have a very simple optional numerical only field:

$('#value').mask("?9999", {placeholder:"-"});

This works OK, but at some stage in the flow I need to wipe the field from the given value the user filled in. This is also OK, but as soon as the user tabs in (or any time the focus event is triggered) the value that was on the field before it was wiped comes back with the exception of the first character that gets replaced by the placeholder (I tried with various placeholders).

So to summarize:

1) user fills in "1234"
2) I retrieve the value and programmatically wipe the field to initialize another transaction
3) user focuses on field again during the new transaction
4) input goes back to "-234"

Is this a known issue or a new bug or am I using it the wrong way?