I need to implement the behavior:
- when you click an item - one thing happens
- but when you press and hold for more than one second, something else happens (for example, the item becomes draggable), and then the first event never fires
I think I know how to catch click & hold event types, but how to distinguish the first and second?
Can you show me how to do this using jsbin . I already made the โclick, hold and dragโ part, except that it still fires the 'click' event after dragging and dropping the element, and it should not.
again: the element clicked - one event, click and hold - the element is dragged (even after the mouse is up), and when it is pressed again, it returns to the normal (non-split) state.
I am not looking for a trivial solution, it should be built using, Rx.Observableor at least a Bacon objectstreamEvent
thank
Agzam source
share