[wp-trac] [WordPress Trac] #60548: Image editor: improve the browsePopup function

WordPress Trac noreply at wordpress.org
Thu Feb 15 14:10:11 UTC 2024


#60548: Image editor: improve the browsePopup function
---------------------------------------+-----------------------------
 Reporter:  afercia                    |      Owner:  (none)
     Type:  defect (bug)               |     Status:  new
 Priority:  normal                     |  Milestone:  Awaiting Review
Component:  Media                      |    Version:  6.3
 Severity:  normal                     |   Keywords:  has-screenshots
  Focuses:  accessibility, javascript  |
---------------------------------------+-----------------------------
 While auditing all the remaining jQuery deprecations still to address in
 core, I noticed a couple things that offer room for improvements in the
 `browsePopup` function of the core image editor.

 1. The `browsePopup` function uses the `window.event` property, which is
 deprecated and should not be used. This is the `global` event. Instead,
 the event should be passed as a function parameter. Aside: instead of
 using inline events, it could have been better to consider a more modern
 approach.
 2. When using the keyboard to navigate the items in the 'Image rotation'
 dropdown menu, the page scrolls. See attached animated GIF. There's some
 code in place to prevent page scrolling you may need to reduce your
 viewport height.

 See [55919] / #50523

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60548>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list