Skip to content

Commit 25b3dc5

Browse files
authored
editor animations -- react timing issue needs fix here too
1 parent 36a7260 commit 25b3dc5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/addons/addons/editor-animations/userscript.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,10 @@ export default async function({ addon }) {
392392
ScratchBlocks.customPrompt = function(...args) {
393393
const modal = ogSBCustomPrompt.call(this, ...args);
394394

395-
handleOpenAnimation("modal");
395+
if (modal) handleOpenAnimation("modal");
396+
else queueMicrotask(() => handleOpenAnimation("modal"));
396397
attachCloseHijack("modal");
398+
397399
return modal;
398400
}
399401

0 commit comments

Comments
 (0)