Make WordPress Core

Changeset 51389 for trunk


Ignore:
Timestamp:
07/09/2021 08:12:29 AM (3 years ago)
Author:
mikeschroder
Message:

Customizer: Skip animations when they have no duration.

In addition to skipping animations when a related style doesn't Exist, now checks to see if animation styles are Empty as well.

This resolves a case where the Gutenberg End to End tests were failing, due to running with animations disabled.

This change should also help some users who are intentionally overriding styles to remove animations.

See https://github.com/WordPress/gutenberg/issues/32024 for the original Gutenberg issue.

Props zieladam, isabel_brison, kevin940726, desrosj, mikeschroder.
Fixes #53562.
See #53542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/customize/controls.js

    r50547 r51389  
    907907        };
    908908        prop = _.find( _.keys( transitions ), function( prop ) {
    909             return ! _.isUndefined( el.style[ prop ] );
     909            return ! _.isUndefined( el.style[ prop ] ) && ! _.isEmpty( el.style[ prop ] );
    910910        } );
    911911        if ( prop ) {
Note: See TracChangeset for help on using the changeset viewer.