7월, 2019의 게시물 표시

javascript 기본 click 이벤트를 어디선가 가로 채어 cancel(preventDefaut) 되었을 때, 이를 누가 가로챘는지 디버깅(debugging)하는 방법

experience anchor태그의 href에 uri를 적어두었는데, 해당 uri로 페이지 이동이 안되는 이슈 발견... ​ 어디선가 click이 취소된 것으로 보이나, 누가 막고 있는지 확인이 필요... ​ ​ ​ 간단히 javascript의 Event 객체의 preventDefault prototype을 override해서 해결 가능.. ​ var oldEPD = Event.prototype.preventDefault; Event.prototype.preventDefault = function() { debugger; oldEPD.call(this); }; ​ ​ from : https://stackoverflow.com/questions/20490931/how-to-find-what-is-causing-a-preventdefault-which-overrides-normal-click-behavior

잘동작하던 iscroll 가로 스크롤(horizontal scroll) 이 크롬(chrome) 모바일 버전에서 갑자기 안되는 이슈

experience 잘동작하던 iscroll을 적용한 dom 가로 스크롤이 갑자기 크롬 모바일 버전에서 동작이 끊기는 현상이 발생..  ​ ​ 찾아보니, iscroll과 크롬의 PointerEvents와의 이슈로 보임.. (크롬 55버전부터인 것으로 보임...) ​ IScroll 초기화시 disablePointer: true 옵션을 주면 다시 정상 동작... ​ ​ from : https://stackoverflow.com/questions/39607777/iscroll-not-working-if-touch-events-are-enabled   ​ ​ from : https://github.com/cubiq/iscroll/issues/1100