[FIX] web_editor: properly set image width attributes
A semi-colon unfortunately took the place of a double pipe in code that retrieves an image's width in order to set its width attribute. This led to some images being wrongly sized. opw-3299392 X-original-commit: 0a21da39f05ef9ec9d202424e0e648849f44e164 Part-of: odoo/odoo#129153
This commit is contained in:
@@ -734,7 +734,7 @@ async function toInline($editable, cssRules, $iframe) {
|
||||
for (const image of images) {
|
||||
if (image.style[attributeName] !== 'auto') {
|
||||
const value = image.getAttribute(attributeName) ||
|
||||
(attributeName === 'height' && image.offsetHeight);
|
||||
(attributeName === 'height' && image.offsetHeight) ||
|
||||
(attributeName === 'width' ? _getWidth(image) : _getHeight(image));
|
||||
if (value) {
|
||||
image.setAttribute(attributeName, value);
|
||||
|
||||
Reference in New Issue
Block a user