开发者

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

开发者 https://www.devze.com 2023-04-11 02:59 出处:网络
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 followe

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

精彩评论

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