Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] web_editor: use media client width as default mediaWidth
Previously, when trying to compute the optimized width for an image, if the mediaWidth option was unspecified, _computeOptimizedWidth would return NaN, and in all the places where it was specified, it was specified as 1920 meaning it was essentially useless. This commit makes the media's clientWidth the default value for mediaWidth, meaning that if options.mediaWidth is unspecified, the size of the element in the page (if one exists) is used. This allows the suggested width to be actually useful, instead of always suggesting 1920. Specifying a mediaWidth in the options overrides this value. task-2215913 closes odoo#47662 Signed-off-by: Quentin Smetz (qsm) <[email protected]>
- Loading branch information