0

ZUL a double click counted as 3 events

asked 2013-12-02 12:34:15 +0800

techsavvy gravatar image techsavvy
1

updated 2013-12-02 12:39:06 +0800

Hi,

I am adding event listeners on a caption for single and double clicks.

Caption caption = new Caption();

caption.addEventListener("onClick", new EventListener() { @Override public void onEvent(Event e) throws Exception { <----Some code----> });

caption.addEventListener("onDoubleClick", new EventListener() { @Override public void onEvent(Event e) throws Exception { <----Some code----> });

I want to do something on a single click and some other thing on double click. But the issue is that double click fires 2 single event and then a double click event.

zul doesn't differentiates between a single and a double click.

How could I resolve this issue? or what is the alternative to this? Is it a bug? I am using version 6.5.2

Thanks..

Vishal Upadhyay

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0
link publish delete flag offensive edit
0

answered 2013-12-04 12:35:34 +0800

techsavvy gravatar image techsavvy
1

I figured out that this is not a zul problem, but it's the issue with underlying javascript.

In js, if single click and double click, both are bind to same element, then on double click, 2 single clicks and 1 double click events are fired. Also, this is browser dependent. Until IE8(Standards mode), double click generates 1 click and 1 double click event.

link publish delete flag offensive edit
Your answer
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
2 followers

RSS

Stats

Asked: 2013-12-02 12:34:15 +0800

Seen: 13 times

Last updated: Dec 04 '13

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