.type() negative number into input not working
See original GitHub issueCurrent behavior:
When typing negative number into input with type “number” set, minus is ignored and possitive number is typed instead.
used method: cy.type()
Desired behavior:
Type negative number.
Steps to reproduce:
Versions
Cypress: 3.0.2 Windows 10 Chrome 67
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
html - Is there any way to prevent input type="number" getting ...
I wanted to allow decimal numbers and not clear the entire input if a negative was inputted. This works well in chrome at...
Read more >Trouble setting negative value for input field - Archive
I'm trying to set a negative value on an input field that always defaults to 0. When using setText to enter 7500, it...
Read more >Prevent negative value from being entered in HTML input type ...
While creating HTML5 input type number in the html form, I would like to disable or prevent user from entering negative number in...
Read more >How does JS interpret negative numbers obtained from a ...
I used an expression where the answer was a negative integer and ran into something unexpected. It seems like the code was interpreting...
Read more >Convert Negative Number into Positive | Excel Basic Tutorial
Below you have a range of cells with negative numbers. So to convert them into positive you just need to enter the formula...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@TheBestPessimist Thanks for this. I see the issue, we don’t take into account that the input has a selection. You can workaround this by doing .clear() before .type() for now. I’ll open an issue to fix this
Edit: see open issue here #4767
in v 3.4.0 i can confirm this bug still appears.
See: