Microsoft Edge:onclick事件停止工作? [英] Microsoft Edge: onclick event stops working?

查看:367
本文介绍了Microsoft Edge:onclick事件停止工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Microsoft Edge中使用我的(ASP.NET)Web应用程序时遇到了奇怪的问题。

I have strange problems with my (ASP.NET) web application in Microsoft Edge.

在某一时刻, onclick 事件停止工作。页面上响应 onclick 事件的所有按钮都停止工作。在同一页面上,我有一些按钮响应 onmousedown 事件并继续工作。

At a certain point the onclick event stops working. All buttons on the page that respond to the onclick event stop working. On the same page I have some buttons that respond to the onmousedown event and they keep working.

如果我刷新页面,问题就消失了。控制台中没有错误。
我对其他浏览器(包括Windows 10下的IE11)没有这个问题。

If I refresh the page, the problem is gone. There are no errors in the console. I do not have this problem with other browsers (including IE11 under Windows 10).

你们有没有遇到过类似的问题?

Did any of you experience similar problems?

推荐答案

这是Edge中的一个错误。

This is a bug in Edge.

我发现它与之相关弹出子窗口并重新排列(或修改)表中的tr。

What I've found is that it's related to both popping up a child window and rearranging(or modifying) tr's in a table.

https://connect.microsoft.com/IE/feedback/details/2109810/browser-stops-registering- click-events-on-table

要解决此问题,您必须强制重绘表格。您可以在修改表格之前设置display:none,然后在更改后设置display:previousValue。

To fix this, you have to force the table to redraw. You can do this by setting display:none before modifying the table, and then setting display:previousValue after changing it.

希望这会有所帮助。

这篇关于Microsoft Edge:onclick事件停止工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆