mirror of
https://github.com/ankitects/anki.git
synced 2025-11-18 10:37:12 -05:00
Fix PlainTextInput not expanding
This commit is contained in:
parent
6295f50587
commit
7242501db3
1 changed files with 12 additions and 9 deletions
|
|
@ -55,15 +55,18 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
isCollapsed = false;
|
isCollapsed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inner.addEventListener(
|
const update = () => {
|
||||||
"transitionend",
|
inner.toggleAttribute("hidden", collapse);
|
||||||
() => {
|
outer.style.removeProperty("overflow");
|
||||||
inner.toggleAttribute("hidden", collapse);
|
hidden = collapse;
|
||||||
outer.style.removeProperty("overflow");
|
};
|
||||||
hidden = collapse;
|
|
||||||
},
|
/* fallback required because transition only triggers if the height changes */
|
||||||
{ once: true },
|
if (height) {
|
||||||
);
|
inner.addEventListener("transitionend", update, { once: true });
|
||||||
|
} else {
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prevent transition on mount for performance reasons */
|
/* prevent transition on mount for performance reasons */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue