Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minus sign is not allowed as 1st character & pressing minus doesn't negate if cursor is not at the end #147

Closed
PrateekRai opened this issue Dec 23, 2015 · 1 comment

Comments

@PrateekRai
Copy link

PrateekRai commented Dec 23, 2015

Hi,

In a negative number scenario, I want to start by entering minus sign followed by number, but this is not working as on 1st minus sign, it shows 0 and then I have to enter some number after that only I can enter minus sign.

Another problem is, if negative number is in input field and if I want to make it positive by hitting minus sign then my cursor must be at the end, if it is at the start or in mid then it is not working.

Please let me know if there is any workaround to handle this scenario.

PrateekRai added a commit to PrateekRai/angular-input-masks that referenced this issue Dec 23, 2015
Updating Parser function for Issue assisrafael#147

n a negative number scenario, I want to start by entering minus sign followed by number, but this is not working as on 1st minus sign, it shows 0 and then I have to enter some number after that only I can enter minus sign.

Another problem is, if negative number is in input field and if I want to make it positive by hitting minus sign then my cursor must be at the end, if it is at the start or in mid then it is not working.
PrateekRai added a commit to PrateekRai/angular-input-masks that referenced this issue Dec 23, 2015
@PrateekRai
Copy link
Author

Created a pull request to fix this issue -
#149

PrateekRai added a commit to PrateekRai/angular-input-masks that referenced this issue Dec 23, 2015
Updating Parser function of number.js to fix issue assisrafael#147

In a negative number scenario, I want to start by entering minus sign followed by number, but this is not working as on 1st minus sign, it shows 0 and then I have to enter some number after that only I can enter minus sign.

Another problem is, if negative number is in input field and if I want to make it positive by hitting minus sign then my cursor must be at the end, if it is at the start or in mid then it is not working.
PrateekRai added a commit to PrateekRai/angular-input-masks that referenced this issue Dec 23, 2015
Updating Parser function of number.js to fix issue assisrafael#147
assisrafael pushed a commit that referenced this issue May 21, 2016
…numbers

* Allow minus sign a first character for negative numbers (fixes #147)

* Allow minus sign as first character for negative numbers

* Adding unit test to check if the field is cleared when it only contains the minus sign
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant