Allow ajax dialog to have focus configurable

Created on 24 February 2023, over 1 year ago
Updated 25 January 2024, 10 months ago

Problem/Motivation

There are some use cases where you don't want that Ajax.dialog autofocuses on the dialog.
My use case is because of: layoutbuilder_extras_live_update →
I am updating the Layout in the background. In this use case I don't want that Dialog gives focus to the dialog again.

I've added a setting on drupalSettings to make this configurable.

if (
          settings.dialog.autoFocus === 'undefined' ||
          settings.dialog.autoFocus !== false
        ) {
          $dialog.dialog('widget').trigger('focus');
        }

Proposed resolution

Add a setting to make this configurable.

Remaining tasks

Review

✨ Feature request
Status

Closed: outdated

Version

11.0 🔥

Component
Ajax  →

Last updated 3 days ago

Created by

🇧🇪Belgium Mschudders

Live updates comments and jobs are added and updated live.
  • Needs accessibility review

    Used to alert the accessibility topic maintainer(s) that an issue significantly affects (or has the potential to affect) the accessibility of Drupal, and their signoff is needed (see the governance policy draft for more information). Useful links: Drupal's accessibility standards, the Drupal Core accessibility gate.

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