Skip to content

Commit 05af0ce

Browse files
authored
reset state after menu animation
1 parent 8ce932c commit 05af0ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,13 @@ export default async function({ addon }) {
180180
if (elementName === "guiCtxMenu") animTime = 500;
181181
else element.style.transform = "translateY(-2px) scale(.999)";
182182

183-
element.animate(
183+
const animation = element.animate(
184184
[{ height: "0px", opacity: 0 }, { height: `${ogHeight}px`, opacity: 1 }],
185185
{ duration: animTime, easing: cubicAnimation }
186186
);
187+
animation.onfinish = () => {
188+
element.style.overflow = "hidden";
189+
};
187190
return;
188191
}
189192

0 commit comments

Comments
 (0)