WP7 + HTML5 - 如何防止选择/突出显示画布

Mar*_*tin 7 css html5 windows-phone-7

我正在尝试为Windows Phone 7/7.5编写一个简单的HTML 5应用程序.我有一个HTML5页面,其画布几乎与屏幕大小相同.当我单击/点击屏幕时,选择了画布.我不希望这种行为,但我仍然希望能够点击/点击各种控件.有没有办法没有这种行为?以下是显示效果的屏幕截图的链接.

截图

我试图在正文中使用CSS删除该行为.到目前为止,没有任何工作.

body {
    /* disable selections / cut copy paste actions */
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;

    /* disable callout, image save panel on long press */
    -webkit-touch-callout: none;

    /* "turn off" link highlight, good for custom pressed states */
    -webkit-tap-hightlight-color: transparent;
}
Run Code Online (Sandbox Code Playgroud)

提前感谢您的帮助!

Lui*_*ero 2

Martin 提到以下示例没有表现出突出显示行为: http://ie.microsoft.com/testdrive/Mobile/Performance/HamsterDanceRevolution/Default.html

所以我做了一些挖掘并注意到上面的示例将事件附加到窗口对象。我将其归结为文件“kinetic-v3.8.4.js”的以下三行修改:

(1)
this.container.addEventListener(baseEvent, handler, false);
-->
window.addEventListener(baseEvent, handler, false);

(2)
this.container.addEventListener('mousedown', function(evt)
-->
window.addEventListener('mousedown', function(evt)

(3)
this.container.addEventListener('mousedown', function(evt)
-->
window.addEventListener('mouseup', function(evt)

进行此修改后,画布仍然会做出反应,并且不需要的突出显示消失了。

问候,路易斯