After using select to change plugin or region, element loses focus and page scrolls to bottom.

Created on 6 March 2023, almost 2 years ago
Updated 10 March 2023, almost 2 years ago

Problem/Motivation

In the field UI, when region or plugin fields are changed, an Ajax form is updated by triggering mousedown on a hidden submit element

$('input[data-drupal-selector="edit-refresh"]').trigger('mousedown');

As a result, focus is transferred to this hidden element as seen here

https://youtu.be/PspRa46ypgU

This is a cosmetic problem due to the page scrolling down and an accessibility problem because the focus is not visible

Steps to reproduce

Proposed resolution

Add a mousedown listener to the hidden submit element, use that to keep track of the element that should remain in focus. Then, in a focus listener on that hidden element, immediately return focus back to the element that should be retaining it.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

9.5

Component
Field UI 

Last updated 9 days ago

Created by

🇺🇸United States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
  • Field UX

    Usability improvements related to the Field UI

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024