Listen to double click not click

前端 未结 6 2031
情歌与酒
情歌与酒 2020-12-15 08:55

I\'m just wondering why click event happening when I dbclick an element?

I have this code:(JSBIN)

HTML

&l         


        
6条回答
  •  暖寄归人
    2020-12-15 09:35

    I would suspect you are working on slow computer. On a slow computer double click could be interpreted as two single click with significant time in between. You can experiment with mouse setting and change the double click setting. That should troubleshoot the problem. If you are computer is really fast and has no lag issue, your problem could be somewhere else. It is very unlikely that double click could be taken as single click as code bug (the one you posted). Problem could be elsewhere if not slowness of the computer.

提交回复
热议问题