132
Views
4
Comments
Onclick and Double click event using same button

Hello everyone,

I am assigning two events to outsystem buttons - one is onclick and one is doubleclick.

Can you please tell me which event will be triggered when a user doubleclicks the button?

UserImage.jpg
Sudarshan HD

Hi 

For the first Event assign the Double Click action then  for the second event assign  the On click action,  then when u click at first time  onclick action will be  trigger and when u double click on the button double click action will trigger please refer below SS

Hope its Helpful.


Thanks 

Sudarshan HD

2024-11-05 11-28-22
Sunil Rajput
2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi,

Apart from the replies that will tell how this works or not to your expectations, from a user experience point of view you should not make a button behave differently based on one click or two clicks. Buttons are expected to response on one click only. Having both click events on one button will make mistakes or unintended action very likely to happen when a user interacts with the button.

To answer your question first onClick is fired, then onDblClick on the order of events, you find more meaningfull information here (search for Dblclick, also here it is mention not to use the event.

https://www.quirksmode.org/js/events_mouse.html

Regards,

Daniel

2023-12-19 16-46-19
Castro Vieira

I think you can make a single client action and work with an IF within the flow


if the flow is true it does the action of button 1

if the flow is false it makes button 2 act

but there will have to be two buttons

I don't know if I managed to explain it well.

Daniel Kuhlmann said... it doesn't make sense for one button to do two things.

if you have any questions, send me a message


Best regards,

André Vieira

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.