Skip to content

Commit b139bc6

Browse files
Ciphroxxkeshav
authored andcommitted
fix: typing animation not playing when letter changes
1 parent c9e5fc2 commit b139bc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pages/alphabets/[alphabet]/playground.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const currentCategory = alphabetData[alphabet as keyof AlphabetsData];
7070

7171
// Animation handling to spelling
7272
spellDiv.classList.remove("animation");
73+
void spellDiv.offsetWidth;
7374
spellDiv.classList.add("animation");
7475

7576
if (info.description && info.description.trim() !== "") {
@@ -79,6 +80,7 @@ const currentCategory = alphabetData[alphabet as keyof AlphabetsData];
7980

8081
// Animation handling for description
8182
descriptionDiv.classList.remove("animation");
83+
void descriptionDiv.offsetWidth;
8284
descriptionDiv.classList.add("animation");
8385
} else {
8486
descriptionDiv.classList.remove("animation");

0 commit comments

Comments
 (0)