mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
88fd1cf483
There is a possibility that the transitionend event of an element/component with t-transition directive won't trigger. Though this situation is difficult to assert, it was observe in odoo runbot for the pos ui. When the transitionend event is not fired, the callback that removes the element from the dom won't be called, resulting to a corrupted view. An example of which is the following: ```html <div t-if="show" t-transition="fade">Hello</div> ``` If `show` is set to false by some ui action and by any chance the transitionend event is not fired (perhaps because the transition didn't actually start or because of completely unknown reason), the div element will remain in the view -- and this is not desirable. This commit patches this situation such that if after 50ms that the transitionend event is supposed to be fired but the event isn't fired, we force the callback using a setTimeout. This guarantees the call of the callback that is suppose to remove the element from the view.