Skip to content
Snippets Groups Projects
Commit 6ae53175 authored by Guillaume (gdi)'s avatar Guillaume (gdi) Committed by qsm-odoo
Browse files

[FIX] website: prevent deadlock on editor restart


Before this commit, a deadlock caused the editor not to restart
correctly when there is an invisible element on a page. The error is
visible by following these steps:

- Edit a website page
- Click on the footer
- Toggle off the page visibility option
- Click on the navbar
- Change the template
- The editor has to restart so click on "OK"

=> The Odoo top bar stays in edit mode and the user is not able to
modify the page.

Technical information:
When entering edit mode via the URL (enable_editor) the `WebsiteNavbar`
is not yet `ReadyForActions` because it is waiting for its sub-component
`EditPageMenu` to start edit mode. Then invisible snippets options start
(so the `VisibilityPageOptionUpdate` too). But for `isShown()` to work,
the navbar must be `ReadyForActions`. This is the reason why we can't
await for `isShown()` in the start of the option, otherwise we would
have a deadlock. On one hand the `WebsiteNavbar` waiting for the
invisible snippets options to be started to be `ReadyForActions` and on
the other hand the `VisibilityPageOptionUpdate` option which needs the
`WebsiteNavbar` to be `ReadyForActions` to be started.

Related to opw-2971181

closes odoo/odoo#103783

Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 17af7977
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment