mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
transition improvements
This commit is contained in:
@ -1,15 +1,9 @@
|
||||
|
||||
const CSS_CLICK_BLOCK = 'click-block-active';
|
||||
const DEFAULT_EXPIRE = 330;
|
||||
let cbEle, fallbackTimerId;
|
||||
let isShowing = false;
|
||||
|
||||
|
||||
function preventClick(ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
}
|
||||
|
||||
function show(expire) {
|
||||
clearTimeout(fallbackTimerId);
|
||||
fallbackTimerId = setTimeout(hide, expire || DEFAULT_EXPIRE);
|
||||
@ -23,10 +17,6 @@ function show(expire) {
|
||||
cbEle = document.createElement('div');
|
||||
cbEle.className = 'click-block ' + CSS_CLICK_BLOCK;
|
||||
document.body.appendChild(cbEle);
|
||||
cbEle.addEventListener('touchstart', preventClick);
|
||||
cbEle.addEventListener('mousedown', preventClick);
|
||||
cbEle.addEventListener('pointerdown', preventClick);
|
||||
cbEle.addEventListener('MSPointerDown', preventClick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user