From a7232395b3c64c1ca3b213a8202309e7a5e531f0 Mon Sep 17 00:00:00 2001 From: Brandon Fowler Date: Thu, 13 Apr 2023 11:00:15 -0400 Subject: [PATCH] Exit overlay immediately if no transition Bug: T334667 Change-Id: I45e976ca290d14287158f0558e01cd4e003d9eb3 --- modules/mobile/overlay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mobile/overlay.js b/modules/mobile/overlay.js index 360809000..9d5c2fe54 100644 --- a/modules/mobile/overlay.js +++ b/modules/mobile/overlay.js @@ -11,7 +11,7 @@ var mobile = mw.mobileFrontend.require( 'mobile.startup' ), * @return {void} */ function onBeforeExitAnimation( overlay, exit ) { - if ( 'transition' in overlay.$el[ 0 ].style ) { + if ( getComputedStyle( overlay.$el[ 0 ] ).transitionDuration !== '0s' ) { // Manually detach the overlay from DOM once hide animation completes. overlay.$el[ 0 ].addEventListener( 'transitionend', exit, { once: true } );