简体   繁体   English

在某些Windows 7计算机上的官方SproutCore演示网站上,鼠标单击不起作用

[英]Mouse clicks don't work on official SproutCore Demo sites on certain Windows 7 computers

I have an application built with SproutCore, and recently several Windows 7 users have reported that mouseclicks (buttons, radio buttons, etc.) don't work at all, on either the latest Chrome or Firefox browsers. 我有一个使用SproutCore构建的应用程序,最近有几个Windows 7用户报告说,在最新的Chrome或Firefox浏览器上,鼠标单击(按钮,单选按钮等)根本不起作用。

After trying several Windows 7 computers, I finally found one that replicates the problem. 在尝试了几台Windows 7计算机之后,我终于找到了一台可以复制该问题的计算机。 Not only that, I found that the problem is visible on the official SproutCore demo sites, http://showcase.sproutcore.com and http://demo.sproutcore.com . 不仅如此,我发现该问题在SproutCore官方演示站点http://showcase.sproutcore.comhttp://demo.sproutcore.com上可见。 While the latter is running an old version of SC, the former is running SproutCore 1.10.0. 后者运行旧版本的SC,而前者运行SproutCore 1.10.0。

On the demo site, none of the controls that require a mouseclick work. 在演示站点上,不需要使用鼠标单击即可进行操作的控件。 The main demo selector scrolls with the scroll wheel, but nothing can be selected. 主演示选择器随滚轮滚动,但无法选择任何内容。 At http://demo.sproutcore.com/sample_controls/ the tabs can't be clicked. http://demo.sproutcore.com/sample_controls/上 ,无法单击选项卡。 At http://showcase.sproutcore.com/#ui/SC.ButtonView the buttons don't respond, etc, etc. http://showcase.sproutcore.com/#ui/SC.ButtonView中 ,按钮无响应,等等,等等。

This is replicatable on my computer and the computers of two of my users, using both Chrome and Firefox, but IE 10 and Opera do work. 这可以在我的计算机上以及我的两个用户的计算机上使用Chrome和Firefox复制,但是IE 10和Opera可以正常工作。 One of the computers is running Windows 7 Ultimate SP 1, the other two are running Windows 7 Professional SP 1. Most other Windows 7 boxes I have tested, however, do not show the bug, so I realize this is going to be very difficult to debug. 其中一台计算机正在运行Windows 7 Ultimate SP 1,另外两台计算机正在运行Windows 7 Professional SP1。但是,我测试过的大多数其他Windows 7盒都没有显示该错误,因此我意识到这将非常困难。调试。

On my app, if I get a reference to a button view and run 在我的应用上,如果我获得对按钮视图的引用并运行

SC.run(function() { 
    view.triggerAction("mousedown");
});

the button does click. 该按钮确实单击。 So somehow the clicks are not triggering that event correctly. 因此,以某种方式,点击无法正确触发该事件。

Has anyone else experienced this and/or knows of a solution? 其他人有没有经历过和/或知道解决方案?


Edit: Looking around at other sites that use SproutCore, I find that the SC Buttons at the top of http://www.bong.tv/ do not work, but the demo site http://tasks.sproutcore.com/tasks does work. 编辑:查看使用SproutCore的其他站点,我发现http://www.bong.tv/顶部的SC按钮不起作用,但是演示站点http://tasks.sproutcore.com/tasks 确实有效。 I have not yet worked out what's different about the Tasks buttons (nor what version of SC it uses). 我尚未弄清楚“任务”按钮有什么不同(也没有使用什么版本的SC)。

Okay sounds like we can promote this to an official answer then. 听起来我们可以将其推广为正式答案。 This is a known bug in SproutCore (see here ). 这是SproutCore中的一个已知错误(请参阅此处 )。 The problem is a combination of SC's longstanding separation of touch and click behavior, and the current total unreliability of all actual touch detection (as opposed to detection of the presence of the API). 问题是SC长期以来将触摸和点击行为分开,以及当前所有实际触摸检测(与检测API是否存在相反)的总不可靠性综合起来。 We're working on a solution. 我们正在研究解决方案。 In the mean time, the best (total hack of a partial) solution appears to be detect SC.browser.os === "windows" and SC.browser.osVersion of "6.2" (win8) or "6.1" (win7), and manually set SC.platform.touch = NO at the top of your project's core.js. 同时,最好的解决方案(部分破解)是检测SC.browser.os ===“ windows”和SC.browser.osVersion为“ 6.2”(win8)或“ 6.1”(win7) ,然后在项目的core.js顶部手动设置SC.platform.touch = NO。 This will fix things for your Win7 & Win8-with-mouse users, but I believe will break them for your Win8-on-tablet users. 这将为您的Win7&Win8-mouse-mouse用户修复问题,但我相信会为您的Win8-on-tablet用户带来麻烦。

Again, definitely not optimal, and we're going to try to have a fix, or a hack, in place for version 1.10.1. 同样,绝对不是最佳选择,我们将尝试对1.10.1版进行修复或修改。

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

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