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

IE10 triggers onChange twice when replacing a text selection #8531

Closed
jfschwarz opened this issue Dec 8, 2016 · 7 comments
Closed

IE10 triggers onChange twice when replacing a text selection #8531

jfschwarz opened this issue Dec 8, 2016 · 7 comments

Comments

@jfschwarz
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

  • Type text "123" in an input
  • Select the whole text
  • Type the A key

When hitting the A key, onChange is triggered twice. One time event.target.value is "". The second time it's "A".

This only happens in IE10. IE9 and IE11 both behave correctly.

Demo fiddle

https://jsfiddle.net/69z2wepo/64637/

ie10onchange

What is the expected behavior?
When hitting the A key, onChange is triggered only one time. event.target.value should be "A".

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

  • React 15.4.1 (possibly also older versions)
  • IE10 / Windows 7
@coreyleelarson
Copy link

I am currently running into this issue as well. Someone please help!

@aweary
Copy link
Contributor

aweary commented Mar 23, 2018

Is this still an issue with React 16?

@suhailnaw
Copy link

suhailnaw commented Mar 25, 2018

I am attempting to look into this, but need some help! @aweary

What's the best practices for debugging older versions of IE? I'm currently running a VM on my Mac with Parallels and have IE11 up. However, JSFiddle won't load the React debugging starter code (https://jsfiddle.net/Luktwrdm) in IE11. I keep on getting "SCRIPT002: Syntax error" on the first line of the html, which is just the doctype html line. I think it's because of the Babel transpiling not working on IE11 on JSFiddle... Any tips?

screen shot 2018-03-25 at 2 35 48 pm

@suhailnaw
Copy link

I tried another approach where I put the bug in an empty React app made with create-react-app, ran the server on my Mac, and logged onto it through my Parallels VM in IE11. I used IE11's emulation feature to emulate IE10 and couldn't replicate the bug for React 16 or 15.4.1.

I will investigate further on actual IE10 when I have access to more disk space for all these VMs, but so far no luck replicating the bug.

@perenstrom
Copy link

perenstrom commented Dec 12, 2020

I'm experiencing this in Android Mobile Chrome 87.0.4280.101 as well. See https://codesandbox.io/s/react-input-event-twice-4dh59. Should I perhaps create a new issue for this?

Edit: Doesn't occur in iOS Mobile Chrome.

Edit 2: Created separate issue: #20476

@eps1lon
Copy link
Collaborator

eps1lon commented Dec 12, 2020

Should I perhaps create a new issue for this?

That would be better. Please include more information about your device and the steps to reproduce. I was not able to reproduce it on my Redmi Note 4 with Chrome 87.0.4280.101.

@gaearon
Copy link
Collaborator

gaearon commented Mar 29, 2022

We've dropped IE from supported browsers in React 18 so this is unlikely to get fixed.
Sorry.

@gaearon gaearon closed this as completed Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants