[FIX] web_editor: error while changing background color of button

Before this commit:

When we want to change the background color of a button, clicking on that button
will occur traceback(dropdown is not a function).

After this commit:

Traceback will not occur by initializing the dropdown component as it has
converted into the OWL component.

Task-2916277

closes odoo/odoo#96508

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Ipsita Borisagar
2022-08-18 16:47:24 +02:00
parent b3fe75b2f3
commit 968c13103f
@@ -1572,7 +1572,9 @@ const Wysiwyg = Widget.extend({
oldColorpicker.destroy();
}
manualOpening = true;
$dropdown.children('.dropdown-toggle').dropdown('show');
const $childElement = $dropdown.children('.dropdown-toggle');
const dropdownToggle = new Dropdown($childElement);
dropdownToggle.show();
const $colorpicker = $dropdown.find('.colorpicker');
const colorpickerHeight = $colorpicker.outerHeight();
const toolbarContainerTop = dom.closestScrollable(this.toolbar.el).getBoundingClientRect().top;