mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
wip
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user