图像按钮单击事件未在chrome中触发

VBK*_*VBK 0 asp.net google-chrome imagebutton

我注意到在Chrome中如果你有一个asp.net图像按钮然后鼠标移动然后鼠标移动,最后鼠标向上,则不会触发单击事件.它适用于其他浏览器.有没有人可以解决这个问题?

Yiğ*_*ner 5

这是因为当你这样做时,chrome会启动选择/拖动行为.尝试以下css.

html, body, div, span, object, form, input, h1, h2, button, label, a, img
{
    -moz-user-select: none;
    -webkit-user-select: none; /* this will work for QtWebKit in future */
    -webkit-user-drag: none;
}
Run Code Online (Sandbox Code Playgroud)