简体   繁体   English

reactjs onClick处理程序未在Windows 8和7上的IE11上附加

[英]reactjs onClick handlers not attaching on IE11 on Windows 8 and 7

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? 我正在使用React进行项目,我遇到这个奇怪的问题,我的onClick处理程序不能在IE11上工作,只能在Windows 8.1和7上运行。它们在其他所有浏览器和Windows 10上运行正常。有没有人碰到任何东西喜欢这样吗? The code is as simple as 代码很简单

<div onClick={ function(event) { console.log(event) } }>A div</div>

However, onMouseUp and onMouseDown events do work. 但是, onMouseUponMouseDown事件确实有效。 Any ideas? 有任何想法吗?

The issue seems to be a bug in the latest version of React (v.0.14.1). 这个问题似乎是最新版React(v.0.14.1)中的一个错误。 When I switched it back to v.0.13.3, it worked. 当我将其切换回v.0.13.3时,它起作用了。

syntax : 句法 :

try using <div onClick="function(event) { console.log(event); }">A div</div> 尝试使用<div onClick="function(event) { console.log(event); }">A div</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM