Skip to content

Commit 5b240d1

Browse files
bso-odooloco-odoo
authored andcommitted
Edit open popup on click anchor on correct element
1 parent 58ea8bd commit 5b240d1

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

addons/html_builder/static/src/core/anchor/anchor_plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class AnchorPlugin extends Plugin {
4747

4848
// TODO check if no other way when doing popup options.
4949
isModal(element) {
50-
element.classList.contains("modal");
50+
return element.classList.contains("modal");
5151
}
5252

5353
setAnchorName(element, value) {

addons/website/static/src/builder/plugins/options/popup_option_plugin.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ class PopupOptionPlugin extends Plugin {
7878
},
7979
copyAnchor: {
8080
apply: ({ editingElement }) => {
81-
this.dependencies.anchor.createOrEditAnchorLink(
82-
editingElement.closest(".s_popup")
83-
);
81+
this.dependencies.anchor.createOrEditAnchorLink(editingElement);
8482
},
8583
},
8684
setPopupDelay: {

0 commit comments

Comments
 (0)