mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
chore(clickblock): use native setTimeout
This commit is contained in:
@ -1,3 +1,6 @@
|
||||
import {nativeTimeout} from './dom';
|
||||
|
||||
|
||||
const CSS_CLICK_BLOCK = 'click-block-active';
|
||||
const DEFAULT_EXPIRE = 330;
|
||||
let cbEle, fallbackTimerId;
|
||||
@ -34,7 +37,7 @@ export class ClickBlock {
|
||||
|
||||
function show(expire) {
|
||||
clearTimeout(fallbackTimerId);
|
||||
fallbackTimerId = setTimeout(hide, expire || DEFAULT_EXPIRE);
|
||||
fallbackTimerId = nativeTimeout(hide, expire || DEFAULT_EXPIRE);
|
||||
|
||||
if (!isShowing) {
|
||||
cbEle.classList.add(CSS_CLICK_BLOCK);
|
||||
|
Reference in New Issue
Block a user