From 3b6088dede8cd99c7fc230ddf90f45a5aa4b12a4 Mon Sep 17 00:00:00 2001 From: Nicolas Bayet Date: Mon, 26 Jul 2021 10:56:34 +0000 Subject: [PATCH] [FIX] website: properly autocomplete url from LinkDialog task-2586134 closes odoo/odoo#74327 X-original-commit: a6cc59d4efb7d63cdfe08d7bec496d048f1ae43d Signed-off-by: Romain Derie --- addons/website/static/src/js/editor/editor.js | 5 +++-- addons/website/static/src/xml/website.editor.xml | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/js/editor/editor.js b/addons/website/static/src/js/editor/editor.js index ca26c09246d..2c35d00b464 100644 --- a/addons/website/static/src/js/editor/editor.js +++ b/addons/website/static/src/js/editor/editor.js @@ -10,9 +10,10 @@ weWidgets.LinkDialog.include({ * * @override */ - start: function () { + start: async function () { + const result = await this._super.apply(this, arguments); wUtils.autocompleteWithPages(this, this.$('input[name="url"]')); - return this._super.apply(this, arguments); + return result; }, }); }); diff --git a/addons/website/static/src/xml/website.editor.xml b/addons/website/static/src/xml/website.editor.xml index 8210ce6930c..ce8ec56a520 100644 --- a/addons/website/static/src/xml/website.editor.xml +++ b/addons/website/static/src/xml/website.editor.xml @@ -14,6 +14,12 @@ + + + Hint: Type '/' to search an existing page and '#' to link to an anchor. + + +