How to check pressed key when startDrag

  Kiến thức lập trình

I use vuedraggable@next library and vue3. I made simple plugin that only connect keyup and keydown event to window, so i have reactive variable with actually pressed key. But when i drag item, the plugin stop working. here is simple code pen:

[1]: https://codepen.io/batuanec/pen/mdgoJeM

when press any key, print it in console, when start drag and press, nothing happen… when stop drag, work it again. I try everything but nothing work for me. i don’t know why??? any idea?

New contributor

batu batu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT