From 247f41f33ccb3d176d4c72d5d984eabca2f8a724 Mon Sep 17 00:00:00 2001 From: Yueyu Date: Sat, 22 May 2021 06:55:00 +0800 Subject: [PATCH] clean up --- src/editor/ui/Library.js | 5 ++++- src/entry/inapp.js | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/editor/ui/Library.js b/src/editor/ui/Library.js index 38ef670..36ae3df 100644 --- a/src/editor/ui/Library.js +++ b/src/editor/ui/Library.js @@ -454,7 +454,10 @@ export default class Library { } tb.className = 'assetbox on'; - selectedOne = tb.id; + // to avoid double click + setTimeout(function () { + selectedOne = tb.id; + }, 200); clickThumb = tb; if (tb.fieldname) { gn('assetname').textContent = tb.fieldname; diff --git a/src/entry/inapp.js b/src/entry/inapp.js index 71e3094..fe84cb8 100644 --- a/src/entry/inapp.js +++ b/src/entry/inapp.js @@ -75,7 +75,6 @@ export function inappInterfaceGuide () { window.parent.ScratchAudio.sndFXWithVolume('keydown.wav', 0.3); } }; - document.addEventListener('touchstart', switchHelp, false); document.addEventListener('click', switchHelp, false); } @@ -126,7 +125,6 @@ export function inappPaintEditorGuide () { window.parent.ScratchAudio.sndFXWithVolume('keydown.wav', 0.3); } }; - document.addEventListener('touchstart', switchHelp, false); document.addEventListener('click', switchHelp, false); }