Skip to content

Commit

Permalink
brought in line with plentz#146
Browse files Browse the repository at this point in the history
  • Loading branch information
gbass84 committed Oct 22, 2014
1 parent c7f3075 commit 23286bb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/jquery.maskMoney.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,14 @@
$input.val(setSymbol(getDefaultMask()));
}
} else {
var newValue;
var newValue = $input.val();
if (!settings.affixesStay) {
newValue = $input.val().replace(settings.prefix, "").replace(settings.suffix, "");
$input.val(newValue);
newValue = newValue.replace(settings.prefix, "").replace(settings.suffix, "");
}
if (!settings.thousandsStay) {
newValue = $input.val().replace(settings.thousands, "");
$input.val(newValue);
newValue = newValue.replace(settings.thousands, "");
}
$input.val(newValue);
}
if ($input.val() !== onFocusValue) {
$input.change();
Expand Down

0 comments on commit 23286bb

Please sign in to comment.