Angular: Long Press Directive with RxJS
1 min readSep 26, 2020
I going to share with you, Long press directive implementation in RxJS. In this implementation, we will start the emitting Output event, when the user presses the mouse button for a specified threshold limit.
Update: Add touch event for touch devices, and to make things working, make sure the button or element, on which the user wants to long-press event to trigger, is non-selected.
Please provide your feedback on this. Here working example