안드로이드 pointer-events 버그

몇몇 안드로이드에서 touchstart 같은 touch전용 이벤트가 걸린 엘리먼트 위에 pointer-events: none;가 걸린 엘리먼트를 위에 띄울경우 touch이벤트가 안먹는 문제가 발생.

class: none
pointer-events: none;
class : touchevent
touchstart, touchmove, touchend

해결 방법

pointer-events를 준 엘리먼트에 e.preventDefault();를 줘서 해결

[js]
document.querySelector(‘.none’).addEventListener(‘touchstart’, function(e) {
e.preventDefault();
});
[/js]

Published by Bathory

안녕하세요.

Leave a comment

댓글 남기기