From 80b3edea0cca6f2d2b4a0418c39893b706e8b045 Mon Sep 17 00:00:00 2001 From: Jinjiu Liu Date: Wed, 20 Sep 2023 15:15:09 +0200 Subject: [PATCH] [FIX] web_editor: restore popover edit link focusing on URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reproduction: 1. Install website 2. Change to edit mode and click a link on the main page, for example, “contact us” at the bottom 3. click "Edit link" in the popover Fix: use the variable `shouldFocusUrl` for link tool props update task-3514360 closes odoo/odoo#137246 X-original-commit: af035687c57f8b34261beff121669ee044d9b7df Signed-off-by: David Monjoie (dmo) Co-authored-by: Rodolpho Lima --- addons/web_editor/static/src/js/wysiwyg/wysiwyg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index 9619bb99343..4bde481edea 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -1345,8 +1345,8 @@ export class Wysiwyg extends Component { } }; } - // update the shouldFocusUrl prop to focus on url when double click - this.state.linkToolProps.shouldFocusUrl = options.shouldFocusUrl; + // update the shouldFocusUrl prop to focus on url when double click and click edit link + this.state.linkToolProps.shouldFocusUrl = shouldFocusUrl; const _onClick = ev => { if ( !ev.target.closest('#create-link') &&