-
- Downloads
[FIX] web_editor: fix button size restored when focused
Steps to reproduce the bug : - In Website (edit mode), drag & drop a "text-image" snippet. - Click on the button. - Change the size of the button to "small". - Click outside the button. - Re-click on the button. - The size selected in the options is "medium" and not "small". Note that the same bug exist in backend with the link dialog. This bug was introduced in ([1]), the code of the "else" (which was removed by it) made it possible to take into account the cases where the option had no "value" (e.g. "medium" size button). And so, without this "else", the options without "value" were activated in any case. This previous commit, which fixed an issue with the presence of the "btn-success" class on a link, could in fact be based on what had already been done for the links with the "btn-link" class (in [2]). In this commit, this issue with the "btn-success" class is handled the same way as for "btn-link". [1]: https://github.com/odoo/odoo/commit/4c68b3e923610e1d573b4bd2b241b2fc5923c412 [2]: https://github.com/odoo/odoo/commit/c3e08e7a7baab1035c3d5c48d668cc02a232e1ac task-3002177 closes odoo/odoo#102632 Signed-off-by:Outagant Mehdi (mou) <mou@odoo.com>
Loading