This commit is contained in:
Adam Bradley
2015-07-16 14:04:15 -05:00
parent a5e5789323
commit f240083535
23 changed files with 729 additions and 36 deletions

View File

@ -3,6 +3,10 @@ const DEFAULT_EXPIRE = 330;
let cbEle, fallbackTimerId;
let isShowing = false;
function disableInput(ev) {
ev.preventDefault();
ev.stopPropagation();
}
function show(expire) {
clearTimeout(fallbackTimerId);
@ -18,6 +22,7 @@ function show(expire) {
cbEle.className = 'click-block ' + CSS_CLICK_BLOCK;
document.body.appendChild(cbEle);
}
cbEle.addEventListener('touchmove', disableInput);
}
}
@ -26,6 +31,7 @@ function hide() {
if (isShowing) {
cbEle.classList.remove(CSS_CLICK_BLOCK);
isShowing = false;
cbEle.removeEventListener('touchmove', disableInput);
}
}