开发者

Image button click event not firing in chrome

开发者 https://www.devze.com 2023-03-20 06:55 出处:网络
I noticed that in chrome if you hav开发者_JAVA技巧e an asp.net image button and do a mouse down then a mouse move and finally a mouse up, a click event is not fired. It works in other browsers. Does a

I noticed that in chrome if you hav开发者_JAVA技巧e an asp.net image button and do a mouse down then a mouse move and finally a mouse up, a click event is not fired. It works in other browsers. Does any body have a work around to this ???


It's because chrome starts a select/drag behavior when you do that. Try the following 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;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消