-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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
Number input goes into infinite loop when Chrome debugger on #6506
Comments
Would you mind reproducing this in JSFiddle? Thanks. |
Ping @eipark |
Not sure if this is reproduceable with a jsfiddle since you need to set a breakpoint in the chrome debugger. |
Can you modify and post the code from one of the examples in the React starter pack, to create a simplified repro, with instructions on how to reproduce? |
Sure. Here is the
I was able to repro the bug with this setup. |
Ok, nice repro! I was able to reproduce. @spicyj immediately said "Chrome bug!" as soon as he saw it, maybe he is right. Interestingly, the Firefox debugger behaves even worse than Chrome does. Commenting out the fake-dom-node-event-logic seems to fix the issue. |
Actually, I take that back, perhaps it is not related to the fake-dom-node-logic. I was overly excited, commenting it out doesn't appear to have done anything :(. |
This appears to be a bug in Chrome: Using: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<input type="number" step="0.01" min="0" value="3" />
<script>
document.querySelector('input').addEventListener('input', function(e) {
// Break here!
console.log(e.target.value);
})
</script>
</body>
</html> Chrome continues to dispatching a new |
Thanks @nhunzaker! |
Possibly related to: #1549
On Mac, Chrome 49.
I have a pretty standard number input like so:
<input type='number' step='0.01' min='0' onChange={someCallback} value={value}/
>When I click the arrow in the input field to change the number, it works properly. However when I open the Chrome inspector and throw a breakpoint somewhere in my rendering flow, I get into an infinite loop where the value of the input field keeps incrementing. It's possible this may be a chrome bug as well.
Stack trace showing how it's looping:
The text was updated successfully, but these errors were encountered: