diff --git a/gonghui/withdraw-exchange/index.html b/gonghui/withdraw-exchange/index.html index ace9edd..5c01538 100644 --- a/gonghui/withdraw-exchange/index.html +++ b/gonghui/withdraw-exchange/index.html @@ -440,6 +440,6 @@ - + diff --git a/gonghui/withdraw-exchange/script.js b/gonghui/withdraw-exchange/script.js index 7f9181b..d20c4ff 100644 --- a/gonghui/withdraw-exchange/script.js +++ b/gonghui/withdraw-exchange/script.js @@ -881,14 +881,15 @@ var last = 0; function run(event) { var now = Date.now(); - if (now - last < 220) return; - last = now; - if (event && event.type === 'pointerdown') { - event.preventDefault(); + if (now - last < 220) { + if (event) event.preventDefault(); + return; } + last = now; + // 只能在 click 阶段变更弹窗状态:WebView 里 pointerdown 先打开遮罩后,同一次触摸生成的 click 会落到新遮罩上,导致详情弹窗刚打开又被关闭。 + if (event) event.preventDefault(); handler(event); } - node.addEventListener('pointerdown', run); node.addEventListener('click', run); }