double click webbutton on touch devices

I embed a webcontainer with a webbutton
An event double-click works with firefox on MsWindows7
But on a tablet it doesn’t. (Android 4.2)

Is this a bug or doesn’t it work whatever?
Is there another way?

Thanks for help
Roland

No reply??

Double click on a button is kind of unusual. Maybe you would have better luck using a canvas.

Tablets may pose other challenges, such as right click being replaced by long tap, not seen by Xojo apps.

At the DOM level there is a double click event defined but not a double touch event.
The framework translates touch events to click events but, in this case, can’t do any translation.

[quote=143981:@Maurizio Rossi]At the DOM level there is a double click event defined but not a double touch event.
The framework translates touch events to click events but, in this case, can’t do any translation.[/quote]

Could be just like right click/long tap.

Maybe you can work around through mousedown/mouseup by measuring the time between successive mousedown.

Michel,
it is not so simple.

The “double” event it’s defined by the client not by server.
The user selects in the OS control panel or window manager what is the preferred time between events to generate a “double” event.
On touch devices a “double” event it’s not a standard action as on desktop systems: these devices behave differently and they define different actions.
Using WebSdk the user can adapt the application to behave differently on desktop and touch enabled devices and create new classes of actions/events that right now the web framework does not implements.

But this it is another story…

[quote=144105:@Maurizio Rossi]Michel,
it is not so simple.

The “double” event it’s defined by the client not by server.
The user selects in the OS control panel or window manager what is the preferred time between events to generate a “double” event.
On touch devices a “double” event it’s not a standard action as on desktop systems: these devices behave differently and they define different actions.
Using WebSdk the user can adapt the application to behave differently on desktop and touch enabled devices and create new classes of actions/events that right now the web framework does not implements.

But this it is another story…[/quote]

What you want to do is not standard in the first place. Double clicking a button is a rather bizarre thing.

If you want to use WebDSK, check the JavaScript way described here
http://stackoverflow.com/questions/5497073/how-to-differentiate-single-click-event-and-double-click-event

I still do not see why using MouseDown/MouseUp to check the time between taps would be an issue…

Hi Michel,
I was only explaining the reasons on why there is not a double click event on touch devices.
And for measuring the time between clicks or whatever at the client side you need to develop something to execute at client side: your suggestion about measuring time between MouseDown events must be done in the client just to eliminate any network delay.

P.S.
Michel did you see that I’m not the one asking to have a double click on a Webbutton?

My point is not to know why there is neither double click or right click, but to suggest a workaround. When a house burns, you do not ask what was the color of the lighter, but you throw water.

Indeed the server side approach may have to deal with delays, but it is the simplest, pure Xojo way. Given the relatively slow event, it should be manageable.

But I just modified my post to include a link to a discussion on SO about the very same approach of timing events, in JavaScript, client side.

I saw you were not the OP, but found your dismissal of the server side method a bit hasty.

Michel,
have you anything else to do in your life?

Maybe I should explain what I want to do:
I made a segmented control myself with webbuttons and this works fine.
BUT
All buttons that are selected should receive another caption from an article table.
I.a.w. I click on several buttons and then I wanted to double click a button to open the database and lookup an article.
The number of the article selected will replace the caption of ALL buttons selected.

If anybody could suggest a method that would work on a tablet?
On desktop pc it works fine.