[wp-trac] [WordPress Trac] #59689: Function listening to AJAX actions to set `Prefers reduced motion` is affecting whole WP Admin in 6.4 RC

WordPress Trac noreply at wordpress.org
Fri Oct 27 18:07:26 UTC 2023


#59689: Function listening to AJAX actions to set `Prefers reduced motion` is
affecting whole WP Admin in 6.4 RC
-------------------------------------------------+-------------------------
 Reporter:  bplv                                 |       Owner:  joedolson
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.4
Component:  Plugins                              |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-         |     Focuses:  javascript
  testing-info                                   |
-------------------------------------------------+-------------------------

Comment (by rudlinkon):

 Replying to [comment:16 joedolson]:
 > Testing instructions:
 >
 > 1) For easier observation, add something obvious like `console.log(
 'Caught AJAX event' );` after the `ajaxComplete` in the listener.
 > 2) Execute an AJAX driven action in the admin, e.g. approving or
 unapproving a comment in the Dashboard activity widget.
 > 3) Observe the console log printing the caught event.
 >
 > This demonstrates that the `ajaxComplete` listener is catching all ajax
 actions.
 >
 > However, I'm not sure that the provided PR solves this; `ajaxComplete`
 still executes, it just exits earlier. If you implemented the same
 instructions above, the test would still fail.
 >
 > Per my comment in the PR, I think that the check should happen as a
 condition for the listener to run.

 Yes, you are right. It is more logical to check the current page before
 starting the listener.

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


More information about the wp-trac mailing list