-
mouseup 이벤트가 동작하지 않을때 해결방법프론트엔드/Javascript 2024. 9. 27. 17:29728x90
https://stackoverflow.com/questions/9506041/events-mouseup-not-firing-after-mousemove
Events-- 'mouseup' not firing after mousemove
I am trying to drag an image with Javascript (no libraries). I am able to listen to mousedown and mousemove events. For some reason, I am not able to capture the mouseup event after mousemove. (I can
stackoverflow.com
Found the issue, if it is going to be of help to anyone:
I added event.preventDefault(); in the mousedown event and now I am getting mouseup notifications.
728x90'프론트엔드 > Javascript' 카테고리의 다른 글
현재 디바이스가 모바일인지 아닌지 검사하기 (1) 2024.09.06 함수와 this (0) 2024.04.20 프로토타입 상속 참고자료 (0) 2024.04.20 비동기 - async, await (0) 2024.03.18 비동기 - 프로미스 체이닝 (0) 2024.03.15