-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
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.
Asked: 2013-12-02 12:34:15 +0800
Seen: 13 times
Last updated: Dec 04 '13