mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04: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;
|
||||
}
|
||||
|
||||
inner.addEventListener(
|
||||
"transitionend",
|
||||
() => {
|
||||
inner.toggleAttribute("hidden", collapse);
|
||||
outer.style.removeProperty("overflow");
|
||||
hidden = collapse;
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
const update = () => {
|
||||
inner.toggleAttribute("hidden", collapse);
|
||||
outer.style.removeProperty("overflow");
|
||||
hidden = collapse;
|
||||
};
|
||||
|
||||
/* fallback required because transition only triggers if the height changes */
|
||||
if (height) {
|
||||
inner.addEventListener("transitionend", update, { once: true });
|
||||
} else {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
/* prevent transition on mount for performance reasons */
|
||||
|
|
Loading…
Reference in a new issue