[英]Chrome doesn't display Javascript alert box
System: Windows Server 2012 via Parallel's 11 系统:Windows Server 2012通过Parallel的11
I'm experiencing a strange problem on Google Chrome 53.0.2 with the Javascript alert box. 我在带有Javascript警报框的Google Chrome 53.0.2上遇到一个奇怪的问题。
As you know, when the alert() function is fired in the browser, a dialog box will immediately be displayed in the browser window. 如您所知,当在浏览器中触发alert()函数时,将立即在浏览器窗口中显示一个对话框。 Strangely, in my Chrome browser, the alert box does not appear until after I click the mouse.
奇怪的是,在我的Chrome浏览器中,直到我单击鼠标后,警告框才出现。
For example: This fiddle should show an alert dialog immediately after I click the button. 例如:单击我的按钮后, 该提琴应该立即显示一个警报对话框。 And, in fact, it works fine in my Firefox and IE browsers.
而且,实际上,它可以在我的Firefox和IE浏览器中正常工作。 However, the alert dialog does not popup in my Chrome browser until after I click my mouse.
但是,直到单击鼠标后,警报对话框才会在Chrome浏览器中弹出。 In other words, when I click the button nothing happens, but if I click my mouse (anywhere), the alert dialog is displayed.
换句话说,当我单击按钮时,什么也没有发生,但是,如果我单击鼠标(任何位置),将显示警报对话框。
This is the markup for the above fiddle: 这是上述小提琴的标记:
<button onclick="alert()">
Show alert dialog
</button>
In an attempt to fix the problem, I uninstalled Chrome (as well as all the Google folders that are created in the Registry, Programs x86, AppData, etc.) - Also, I have disabled all my Chrome extensions and have tried using Incognito. 为了解决此问题,我卸载了Chrome(以及在注册表,程序x86,AppData等中创建的所有Google文件夹)-此外,我已禁用了所有Chrome扩展程序并尝试使用Incognito。 None of the above has fixed the problem.
以上都不解决此问题。
What is causing this problem and how do I fix it? 是什么导致此问题,我该如何解决?
I had a similar issue in recent weeks. 最近几周我也遇到了类似的问题。 After much testing I was able to correct this by the following means
经过大量测试,我能够通过以下方式纠正此问题
I won't pretend to know why this worked. 我不会假装知道为什么这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.