-
- Downloads
[FIX] web_editor: avoid failing switching mode while image is selected
Since [1] an error is raised when switching the Mode of an Images Wall from Float to Grid or Masonry while an image is selected. The display of the size of the image is being updated while its option panel is not there anymore. This commit prevents this error from happening by checking if the `.data('$optionsSection')` hack (as stated when it was introduced in [2]) is available before trying to use it. Steps to reproduce: - Drop an Images Wall snippet. - Switch Mode to Float. - Select an image. - Switch Mode to Grid. => Traceback. [1]: https://github.com/odoo/odoo/commit/2cbb691a84ce186ddd34a2a4c76d95671ed6e834 [2]: https://github.com/odoo/odoo/commit/5ac6a7a5dbd2af1190d0d027d0239dd1cfc257b0 task-2990053 closes odoo/odoo#119156 Signed-off-by:Vray Benjamin (bvr) <bvr@odoo.com>
Loading