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