Saturday, May 7, 2022
2 changes · master
Miscellaneous changes
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#90740
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#90740
Before this commit, the animations were never launched in a mega menu with the navbar option "sub menus = on hover" enabled. Indeed the animations are launched when the element to be animated appears in the viewport according to the scroll. But in the case of a mega menu we just want the animation to start when the mega menu is opened. For that we don't need all the code that checks the scroll, etc. The animation starts by itself when the element inside the mega menu is made visible in
Original PR description
Before this commit, the animations were never launched in a mega menu with the navbar option "sub menus = on hover" enabled. Indeed the animations are launched when the element to be animated appears…
Before this commit, the animations were never launched in a mega menu with the navbar option "sub menus = on hover" enabled. Indeed the animations are launched when the element to be animated appears in the viewport according to the scroll. But in the case of a mega menu we just want the animation to start when the mega menu is opened. For that we don't need all the code that checks the scroll, etc. The animation starts by itself when the element inside the mega menu is made visible in CSS. A first attempt to fix this was made by this commit [1], but this fix was wrong. Indeed, as explained above, animations in a dropdown do not need to be triggered on scroll. And moreover, it didn't work properly because the animations were never reset when the dropdown was closed. This commit also hides the "Each time it becomes visible" option for an element animated in a mega menu. This was already done in the "_computeWidgetVisibility" but by mistake, there were 2 "_computeWidgetVisibility" in the js code of "websiteAnimate", which meant that the one hiding this option was not taken into account. [1]: https://github.com/odoo/odoo/commit/7a96557b839a69a9d44aac4242af2d21bc7f0e38 task-2764895 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#89304