0

3 events triggered on double click

asked 2014-07-03 07:34:30 +0800

ajaidka gravatar image ajaidka
196 4

Please See code below

<zk>
  <window border="normal" title="hello">

    <div>onClick and onDoubleClick Problem</div>

    <a label="Double Click Me" onClick="alert(event)" onDoubleClick="alert(event)"/>
  </window>
</zk>

When you double click on link, it will call 2 onClick events and one onDoubleClick event. But I expect only one onClick event on single click and only one onDoubleClick on when I do a double click. Any idea how to control it?

delete flag offensive retag edit

1 Reply

Sort by » oldest newest

answered 2014-07-03 08:38:51 +0800

vincentjian gravatar image vincentjian
2245 6

Hi, it is the default browser behavior. Check the sample on jsfiddle.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-07-03 07:34:30 +0800

Seen: 12 times

Last updated: Jul 03 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More