Skip to content

Commit 269f5c4

Browse files
authored
editor-animations -- fix double clicking library collapse button
1 parent dfd9bcc commit 269f5c4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,14 @@ export default async function({ addon }) {
280280
);
281281
} else {
282282
collapser.style.transform = "rotateY(0deg)";
283-
collapser.setAttribute("closed", "true");
284283
const animation = filterDiv.animate(
285284
[{ width: "342px", opacity: 1 }, { width: "0px", opacity: 0 }],
286285
{ duration: 300, easing: cubicAnimation }
287286
);
288-
animation.onfinish = () => { filterDiv.style.display = "none" };
287+
animation.onfinish = () => {
288+
collapser.setAttribute("closed", "true");
289+
filterDiv.style.display = "none";
290+
};
289291
}
290292

291293
e.stopPropagation();

0 commit comments

Comments
 (0)