SmartGWT 元素在 Chrome 和 Chrome 中不接收鼠标事件狩猎之旅
我正在使用 smartGWT 2.5 开发一个模块,我的 html 起始页如下:
<html>
<head>
<title>Test App</title>
<script> var isomorphicDir = "testApp/sc/"; </script>
<script src="testApp/sc/modules/ISC_Core.js"></script>
<script src="testApp/sc/modules/ISC_Foundation.js"></script>
<script src="testApp/sc/modules/ISC_Containers.js"></script>
<script src="testApp/sc/modules/ISC_Grids.js"></script>
<script src="testApp/sc/modules/ISC_Forms.js"></script>
<script src="testApp/sc/modules/ISC_RichTextEditor.js"></script>
<script src="testApp/sc/modules/ISC_DataBinding.js"></script>
<script>
currentSkin = "Enterprise";
document.write("<"+"script src=\"testApp/sc/skins/" + currentSkin + "/load_skin.js?isc_version=7.1.js\"><"+"/script>");
</script>
<script src="testApp/testApp.nocache.js"></script>
</head>
<body>
<iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
</body>
</html>
&这是我的entryPoing 实现:
public class testApp extends SmartGwtEntryPoint {
@Override
public void onModuleLoad() {
final DynamicForm form = new DynamicForm();
form.setWidth100();
form.setHeight100();
ButtonItem loginButton = new ButtonItem("loginButton", "Login");
loginButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
SC.say("Test!");
}
});
form.setFields(loginButton);
VLayout mainLayout = new VLayout();
mainLayout.setHeight100();
mainLayout.setWidth100();
mainLayout.addMember(form);
mainLayout.draw();
}
}
我的起始页成功启动&显示创建的表单的登录按钮,但问题是它不适用于鼠标单击(但适用于键盘按键),似乎该按钮没有接收任何鼠标事件。
我仅在 chrome 和 chrome 中遇到此问题safari,但在 firefox 中工作正常。
有什么想法吗?
I'm using smartGWT 2.5 to develope a module, my html start page is as below:
<html>
<head>
<title>Test App</title>
<script> var isomorphicDir = "testApp/sc/"; </script>
<script src="testApp/sc/modules/ISC_Core.js"></script>
<script src="testApp/sc/modules/ISC_Foundation.js"></script>
<script src="testApp/sc/modules/ISC_Containers.js"></script>
<script src="testApp/sc/modules/ISC_Grids.js"></script>
<script src="testApp/sc/modules/ISC_Forms.js"></script>
<script src="testApp/sc/modules/ISC_RichTextEditor.js"></script>
<script src="testApp/sc/modules/ISC_DataBinding.js"></script>
<script>
currentSkin = "Enterprise";
document.write("<"+"script src=\"testApp/sc/skins/" + currentSkin + "/load_skin.js?isc_version=7.1.js\"><"+"/script>");
</script>
<script src="testApp/testApp.nocache.js"></script>
</head>
<body>
<iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
</body>
</html>
& this is my entryPoing implementation :
public class testApp extends SmartGwtEntryPoint {
@Override
public void onModuleLoad() {
final DynamicForm form = new DynamicForm();
form.setWidth100();
form.setHeight100();
ButtonItem loginButton = new ButtonItem("loginButton", "Login");
loginButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
SC.say("Test!");
}
});
form.setFields(loginButton);
VLayout mainLayout = new VLayout();
mainLayout.setHeight100();
mainLayout.setWidth100();
mainLayout.addMember(form);
mainLayout.draw();
}
}
My start page successfully initiates & shows the Login button of the created form, but the problem is that it does NOT work with mouse clicks(but works with keyboard key press), seems that the button does not receive any of mouse events.
I've this problem ONLY in chrome & safari, but it works correctly in firefox.
any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此代码不会重现问题(在任何浏览器中)。需要调查的事项:
您是否有非常旧的 GWT 版本,或者是否有多个 GWT 副本?
您的 .gwt.xml 中是否有可能干扰第三方库的其他继承?
您的 Safari 或 Chrome 中是否有导致问题的浏览器扩展?
如果您无法立即找到原因,请在第二台计算机上进行全新安装,以便您可以看到代码或 SmartGWT 没有问题,然后返回对损坏的环境的特殊情况进行故障排除。
This code doesn't reproduce the problem (in any browser). Things to look into:
Do you have a very old version of GWT, or perhaps more than one copy of GWT around?
Do you have additional inherits in your .gwt.xml for third-party libraries which might be interfering?
Do you have browser extensions in Safari or Chrome that are causing a problem?
If you can't immediately find the cause, do a clean install on a second machine just so that you can see that there's no problem with your code or SmartGWT, then return to troubleshooting what's special about the broken environment.
Chrome 中的 AddBlock 扩展给我带来了这个问题!
AddBlock extension in Chrome caused this issue for me!