diff --git a/addons/html_builder/static/src/builder/components/option_container.js b/addons/html_builder/static/src/builder/components/option_container.js index 01a1f0de467dd..96a30f1575dee 100644 --- a/addons/html_builder/static/src/builder/components/option_container.js +++ b/addons/html_builder/static/src/builder/components/option_container.js @@ -2,6 +2,7 @@ import { Component, useSubEnv } from "@odoo/owl"; import { defaultBuilderComponents } from "../builder_components/default_builder_components"; import { useVisibilityObserver, useApplyVisibility } from "../builder_components/utils"; import { DependencyManager } from "../plugins/dependency_manager"; +import { getSnippetName } from "@html_builder/utils"; export class OptionsContainer extends Component { static template = "html_builder.OptionsContainer"; @@ -22,6 +23,6 @@ export class OptionsContainer extends Component { } get title() { - return this.env.getEditingElement().dataset.name; + return getSnippetName(this.env.getEditingElement()); } } diff --git a/addons/html_builder/static/tests/custom_tab/misc.test.js b/addons/html_builder/static/tests/custom_tab/misc.test.js index 40362bab0de6b..6e8a4241f321d 100644 --- a/addons/html_builder/static/tests/custom_tab/misc.test.js +++ b/addons/html_builder/static/tests/custom_tab/misc.test.js @@ -106,7 +106,10 @@ test("option that matches several elements", async () => { await setupWebsiteBuilder(`