diff --git a/addons/web/static/src/js/owl_compatibility.js b/addons/web/static/src/js/owl_compatibility.js index aabb0f9861c4fddaad9c3a3aae9740367578366e..604833aad02c9746ae8cc3ca7449fc08a603ea22 100644 --- a/addons/web/static/src/js/owl_compatibility.js +++ b/addons/web/static/src/js/owl_compatibility.js @@ -375,10 +375,17 @@ odoo.define('web.OwlCompatibility', function () { */ on_attach_callback() { function recursiveCallMounted(component) { + const { status, currentFiber } = component.__owl__; + + if (status === 2 && currentFiber && !currentFiber.isCompleted) { + // the component is rendered but another rendering is being done + // it would be foolish to declare the component and children as mounted + return; + } if ( - component.__owl__.status !== 2 /* RENDERED */ && - component.__owl__.status !== 3 /* MOUNTED */ && - component.__owl__.status !== 4 /* UNMOUNTED */ + status !== 2 /* RENDERED */ && + status !== 3 /* MOUNTED */ && + status !== 4 /* UNMOUNTED */ ) { // Avoid calling mounted on a component that is not even // rendered. Doing otherwise will lead to a crash if a