File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -393,22 +393,11 @@ export const AppLayoutMixin = (superclass) =>
393393 /**
394394 * Returns a promise that resolves when the drawer opening/closing CSS transition ends.
395395 *
396- * The method relies on the `--vaadin-app-layout-transition-duration` CSS variable to detect whether
397- * the drawer has a CSS transition that needs to be awaited. If the CSS variable equals `0s`,
398- * the promise resolves immediately.
399- *
400396 * @return {Promise }
401397 * @private
402398 */
403399 __drawerTransitionComplete ( ) {
404- return new Promise ( ( resolve ) => {
405- if ( this . _getCustomPropertyValue ( '--vaadin-app-layout-transition-duration' ) === '0s' ) {
406- resolve ( ) ;
407- return ;
408- }
409-
410- this . $ . drawer . addEventListener ( 'transitionend' , resolve , { once : true } ) ;
411- } ) ;
400+ return Promise . all ( this . $ . drawer . getAnimations ( ) . map ( ( animation ) => animation . finished ) ) ;
412401 }
413402
414403 /** @private */
You can’t perform that action at this time.
0 commit comments