Image button click event not firing in chrome

◇◆丶佛笑我妖孽 提交于 2019-12-20 06:26:59

问题


I noticed that in chrome if you have 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 ???


回答1:


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;
}


来源:https://stackoverflow.com/questions/6703822/image-button-click-event-not-firing-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!