I would like the button to lead to one action when simply pressed and lead to another action when pressed for 3 seconds.
I tried some things with custom states when the button is pressed but there doesnât seem to be a way to add values to an input field by simply pressing a button.
You could then have a workflow start when the âcounterâ reaches a certain number (for example 3 seconds).
You can create a timer that counts down when you click on a button but it doesnât know the difference between clicked or pressed. You can also not set a custom state to the button when you press it to distinguish clicked from pressed. But I still think that the âpressedâ state would be key in this issue!
Definitely an interesting feature though.Sorry I couldnât be of more help, maybe someone else has a better approach!
I wasnât able to find anything in the MDN documentation for the DOM event âclickâ:
I scanned over some Stack Overflow articles about using JavaScript and shallowly concluded a timer would be the best way.
It may be possible, but I donât think itâd be easy or even desired. Itâs somewhat of an unexpected UI featureâŚmost typical users would not expect a different behavior on a long press with a mouse.
This topic was automatically closed after 70 days. New replies are no longer allowed.