mirror of
https://github.com/ankitects/anki.git
synced 2025-11-10 22:57:11 -05:00
Remove style attribute after remove float property if not styling left
This commit is contained in:
parent
9b7ea75399
commit
9001b597da
1 changed files with 6 additions and 1 deletions
|
|
@ -41,7 +41,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
active={image.style.float === "" || image.style.float === "none"}
|
active={image.style.float === "" || image.style.float === "none"}
|
||||||
flipX={isRtl}
|
flipX={isRtl}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
image.style.float = "";
|
image.style.removeProperty("float");
|
||||||
|
|
||||||
|
if (image.getAttribute("style")?.length === 0) {
|
||||||
|
image.removeAttribute("style");
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(() => dispatch("update"));
|
setTimeout(() => dispatch("update"));
|
||||||
}}>{@html floatNoneIcon}</IconButton
|
}}>{@html floatNoneIcon}</IconButton
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue