I'm using React for a project and I'm having this weird issue where my onClick
handlers are not working on IE11 but only on Windows 8.1 and 7. They work fine in every other browser and on Windows 10. Has anyone run into anything like this before? The code is as simple as
<div onClick={ function(event) { console.log(event) } }>A div</div>
However, onMouseUp
and onMouseDown
events do work. Any ideas?
The issue seems to be a bug in the latest version of React (v.0.14.1). When I switched it back to v.0.13.3, it worked.
syntax :
try using <div onClick="function(event) { console.log(event); }">A div</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.