Closed elieobeid7 closed 8 years ago
Please write how your directive looks like (what options you set). And additional info which are necessary to reproduce bug.
@uhlryk
By modifying the "Number may be only negative, decimal separator dot" example to only accept positive number (so rename num-pos attribute to num-neg), you will see that the input behaves incorrectly whenever you type the negative sign first:
• It allows the sign symbol (-) to be typed (it has to be the first character typed) • Then if you type a a digit, it deletes the sign symbol however it converts it to 0 and loose the digit you typed • If you continue to type a second digit it is correctly taken into account • If you only type in the sign symbol (-) the model is set to 0 • The behavior is correct if you don't type the sign symbol as the very first character
save this .html file and see, i cant share it here
thank you very much for your feedback. Yes it is bug. It should be fixed now. Please check if now it is better
It is also in examples (8th input)
will check on monday and let you know, tuesday max. thank you!
Issue solved, you may close the ticket, thanks for your help
How to allow only positive numbers? I'm using angular 1.x and there's seem to be a bug or please show a working example. Users shouldn't be able to enter negative numbers.