angular-input-masks icon indicating copy to clipboard operation
angular-input-masks copied to clipboard

Pasting negative numbers, or negative ngmodel...

Open tiagoadp opened this issue 9 years ago • 6 comments

Hello ppl, the ng-negative-number work only if you input the '-' char... but if you paste a negative number or change the ng-model to a negative value, it won´t work...

I am issuing this, because i need to change a money mask positive or negative acording to the dynamic calc of several fields... And thus can give me a ng-model positive or negative... but the field only gets the int and ignores the '-' from the model.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/24891651-pasting-negative-numbers-or-negative-ngmodel?utm_campaign=plugin&utm_content=tracker%2F1022469&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1022469&utm_medium=issues&utm_source=github).

tiagoadp avatar Jul 24 '15 14:07 tiagoadp

The built in behavior for entering negative values is not very natural. The user is forced to enter a number first before they press - to convert it to a negative number. Ideally it should allow the user -99999 in that order.

kjavia avatar Nov 17 '15 21:11 kjavia

+1 for allowing user to enter negative sign first

simonaberry avatar Dec 09 '15 09:12 simonaberry

+2 for allowing user to enter negative sign first

jlnery-zz avatar Jan 22 '16 20:01 jlnery-zz

@kjavia I fixed that behavior! I'll do a PR.

jlnery-zz avatar Jan 25 '16 13:01 jlnery-zz

@jlnery thanks. +1

kjavia avatar Feb 07 '16 00:02 kjavia

the fix was merged?

lucasjorge944 avatar May 30 '22 13:05 lucasjorge944