Every click event on the web works on mouse click and release. Is there a way to do a action on a click event before mouse release??
In your case, you could trap onmousedown or onmouseup before the click event is fired.
The onmousedown, onmouseup, and onclick events are all parts of a mouse-click. First when a mouse-button is clicked, the onmousedown event is triggered, then, when the mouse-button is released, the onmouseup event is triggered, finally, when the mouse-click is completed, the onclick event is triggered.
If you mouse-down on a button, move the mouse off the button surface and finally release the mouse, no mouse click event will be fired. This can save your day, if you have pressed the mouse on the delete-all-my-work-button inadvertently!