开发者

Why is a click event not stopped by stopping mousedown/mouseup?

Coulda sworn this wasn't how it used to work, but with jque开发者_运维问答ry my click event is firing even if I return false on both mousedown and mouseup.


Because a click event is a mousedown followed by a mouseup. Stopping/absorbing the ancestor events don't change the fact that they happened, and having happened is all that is required to trigger the descendent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜