[wp-trac] [WordPress Trac] #53562: Widgets Editor in Customizer doesn't load with E2E tests + 0ms Animations

WordPress Trac noreply at wordpress.org
Tue Jul 13 14:45:38 UTC 2021


#53562: Widgets Editor in Customizer doesn't load with E2E tests + 0ms Animations
--------------------------+----------------------------------------------
 Reporter:  mikeschroder  |       Owner:  mikeschroder
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  5.8.1
Component:  Editor        |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  javascript, css, administration
--------------------------+----------------------------------------------

Comment (by mikeschroder):

 Went ahead and reverted this to fix the focus issues, and because I
 haven't found the right fix yet.

 Looked into this a bit with @makaduka today.

 Essentially, the previous commit [51389] was always setting
 `normalizedTransitionendEventName` to null, which while an incorrect fix,
 had the effect of firing `completeCallback` regardless of whether there
 was a `transitionend` event or not.

 However, when `completeCallback` is called [https://github.com/WordPress
 /wordpress-
 develop/blob/master/src/js/_enqueues/wp/customize/controls.js#L1268 at
 that location], the final focus of the back button doesn't happen.

 While not common, I believe this also means that when transitions aren't
 supported by the browser, users would run into the same bug with focus.

 I experimented with changing where this happens, but haven't yet been able
 to find a way to fire `completeCallback` in a location where the rest of
 the process happens as expected. Any help is is appreciated! (cc:
 @kevin940726 @westonruter)

 @mamaduka pointed out that `transitionend` would also
 [https://developer.mozilla.org/en-
 US/docs/Web/API/HTMLElement/transitionend_event not be called if
 transitions are disabled] via `prefers-reduced-motion` (#53542).

 I think this means that if we want to remove the transitions entirely
 (rather than make them very short, for instance), we'd need to adjust this
 Customizer JS to support it, regardless of the method that removes the
 animations.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53562#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list