Loading core/lib/Drupal/Core/Render/Element/RenderElement.php +1 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ public static function preRenderAjaxForm($element) { // event. This behavior can be explicitly overridden if needed. if (!isset($element['#ajax']['refocus-blur'])) { // The change event on text input types is triggered on blur. $text_types = ['password', 'textfield', 'number', 'tel', 'textarea']; $text_types = ['password', 'textfield', 'number', 'tel', 'textarea', 'machine_name']; if ($element['#ajax']['event'] === 'blur' || ($element['#ajax']['event'] === 'change' && in_array($element['#type'], $text_types))) { $element['#attributes']['data-refocus-blur'] = "true"; } Loading core/misc/machine-name.js +7 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,13 @@ // If it is editable, append an edit link. const $link = $( '<span class="admin-link"><button type="button" class="link" aria-label="' .concat(Drupal.t('Edit machine name'), '">') .concat( Drupal.t('Edit machine name'), '" data-drupal-selector="'.concat( $target.data('drupal-selector'), ), '-machine-name-admin-link">', ) .concat(Drupal.t('Edit'), '</button></span>'), ) .on('click', eventData, clickEditHandler) Loading Loading
core/lib/Drupal/Core/Render/Element/RenderElement.php +1 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ public static function preRenderAjaxForm($element) { // event. This behavior can be explicitly overridden if needed. if (!isset($element['#ajax']['refocus-blur'])) { // The change event on text input types is triggered on blur. $text_types = ['password', 'textfield', 'number', 'tel', 'textarea']; $text_types = ['password', 'textfield', 'number', 'tel', 'textarea', 'machine_name']; if ($element['#ajax']['event'] === 'blur' || ($element['#ajax']['event'] === 'change' && in_array($element['#type'], $text_types))) { $element['#attributes']['data-refocus-blur'] = "true"; } Loading
core/misc/machine-name.js +7 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,13 @@ // If it is editable, append an edit link. const $link = $( '<span class="admin-link"><button type="button" class="link" aria-label="' .concat(Drupal.t('Edit machine name'), '">') .concat( Drupal.t('Edit machine name'), '" data-drupal-selector="'.concat( $target.data('drupal-selector'), ), '-machine-name-admin-link">', ) .concat(Drupal.t('Edit'), '</button></span>'), ) .on('click', eventData, clickEditHandler) Loading