[wp-trac] [WordPress Trac] #40909: Focus in attachment custom fields is lost when updating the value.
WordPress Trac
noreply at wordpress.org
Sun Feb 5 19:55:52 UTC 2023
#40909: Focus in attachment custom fields is lost when updating the value.
-------------------------------------+-------------------------------------
Reporter: lucymtc | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.2
Component: Media | Version: 4.7.5
Severity: normal | Resolution:
Keywords: dev-feedback has-patch | Focuses: accessibility,
2nd-opinion | javascript
-------------------------------------+-------------------------------------
Changes (by joedolson):
* keywords: dev-feedback has-patch => dev-feedback has-patch 2nd-opinion
Comment:
The PR fixes the loss of focus state by removing the 'initialize' method
in AttachmentCompat.
Like @lucymtc, I'm unable to see any reason that this method is required,
but would appreciate a second opinion from somebody who might know.
@adamsilverstein @joemcgill, perhaps you know something?
Removing the method resolves the accessibility issue by allowing focus to
flow without disruption.
The alternate suggestion by @lucymtc, monitoring the last focus, is not
quite what we'd need to do, so the alternative gets more tricky - we'd
actually need to monitor the expected next focus. The save runs when focus
leaves the field but before focus moves to the next field, so setting
focus back to the previous location would actually be confusing - you'd
leave the field and then be immediately sent back to it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40909#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list