diff --git a/libs/actions.js b/libs/actions.js index 1c21c452..f1bcaee2 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -590,10 +590,6 @@ actions.prototype._sys_onup = function () { // 长按 if (!core.status.lockControl && stepPostfix.length == 0 && core.status.downTime != null && new Date() - core.status.downTime >= 1000) { - clearTimeout(core.interval.onDownTimeout); - core.interval.onDownTimeout = null; - clearInterval(core.interval.onDownInterval); - core.interval.onDownInterval = null; core.actions.longClick(posx, posy, 32 * posx + 16, 32 * posy + 16); } else { diff --git a/libs/ui.js b/libs/ui.js index c304e5d3..25682fd0 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -673,6 +673,9 @@ ui.prototype.closePanel = function () { core.status.event.selection = null; core.status.event.ui = null; core.status.event.interval = null; + // 清除onDownInterval + clearInterval(core.interval.onDownInterval); + core.interval.onDownInterval = 'tmp'; } ui.prototype.clearUI = function () {