remove image.style.height on resize (#1856)
This commit is contained in:
parent
ab1c23953e
commit
fb5521eeed
@ -152,12 +152,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
}
|
||||
|
||||
/**
|
||||
* Image resizing add-ons previously used image.style.width to set the
|
||||
* preferred width of an image. In these cases, if we'd only set
|
||||
* image.width, there would be no visible effect on the image.
|
||||
* To avoid confusion with users we'll clear image.style.width (for now).
|
||||
* Image resizing add-ons previously used image.style.width/height to set the
|
||||
* preferred dimension of an image. In these cases, if we'd only set
|
||||
* image.[dimension], there would be no visible effect on the image.
|
||||
* To avoid confusion with users we'll clear image.style.[dimension] (for now).
|
||||
*/
|
||||
activeImage!.style.removeProperty("width");
|
||||
activeImage!.style.removeProperty("height");
|
||||
if (activeImage!.getAttribute("style")?.length === 0) {
|
||||
activeImage!.removeAttribute("style");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user