R
R
Ruslan Absalyamov2018-12-04 20:22:29
Vue.js
Ruslan Absalyamov, 2018-12-04 20:22:29

How to fire an event when you hold down the mouse button?

There is a table with columns https://jsfiddle.net/eywraw8t/490541/
I need to be able to change the width of the column when holding the edge of the column. Now it happens something like this: when the mouse leaves the border, the event still works, it does not stop, and it is necessary to release the mouse in the border itself.
Of course, it would be ideal if you attach an event to the mouse, so that it follows not only the expansion of the column, but when you still need to narrow the column

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Sedyshev, 2018-12-04
@ musikant777

You need to hang the mouseup event on the document so that wherever the button is released, the handler would still be called.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question