Skip to content

Commit e217570

Browse files
author
Serhii Rubanskyi - seru
committed
prevent default when we are in edit mode
we had a problem when we click on "edit" and while it was opening we could switch pages
1 parent 0973924 commit e217570

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

addons/website/static/src/client_actions/website_preview/website_builder_action.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,14 @@ export class WebsiteBuilder extends Component {
275275
// Forward clicks to close backend client action's navbar
276276
// dropdowns.
277277
this.websiteContent.el.dispatchEvent(new MouseEvent("click", ev));
278-
/* TODO ?
279278
} else {
280279
// When in edit mode, prevent the default behaviours of clicks
281280
// as to avoid DOM changes not handled by the editor.
282281
// (Such as clicking on a link that triggers navigating to
283282
// another page.)
284-
if (!ev.target.closest("#oe_manipulators")) {
283+
if (!ev.target.closest("body.editor_enable")){
285284
ev.preventDefault();
286285
}
287-
*/
288286
}
289287
const linkEl = ev.target.closest("[href]");
290288
if (!linkEl) {

0 commit comments

Comments
 (0)