Loading core/misc/ajax.js +3 −1 Original line number Diff line number Diff line Loading @@ -1085,7 +1085,9 @@ const focusChanged = Object.keys(response || {}).some((key) => { const { command, method } = response[key]; return ( command === 'focusFirst' || (command === 'invoke' && method === 'focus') command === 'focusFirst' || command === 'openDialog' || (command === 'invoke' && method === 'focus') ); }); Loading core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,9 @@ public function testUserFieldBlock() { $this->clickLink('Place block'); $assert_session->assertWaitOnAjaxRequest(); // Ensure that focus is on the first focusable element on modal. $this->assertJsCondition('document.activeElement === document.getElementsByClassName("block-filter-text")[0]'); // Ensure that fields without any formatters are not available. $assert_session->pageTextNotContains('Password'); // Ensure that non-display-configurable fields are not available. Loading core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php +0 −3 Original line number Diff line number Diff line Loading @@ -527,9 +527,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen 'type' => 'throbber', 'message' => $this->t('Opening media library.'), ], // The AJAX system automatically moves focus to the first tabbable // element of the modal, so we need to disable refocus on the button. 'disable-refocus' => TRUE, ], // Allow the media library to be opened even if there are form errors. '#limit_validation_errors' => [], Loading core/modules/media_library/src/Plugin/views/field/MediaLibrarySelectForm.php +0 −3 Original line number Diff line number Diff line Loading @@ -104,9 +104,6 @@ public function viewsForm(array &$form, FormStateInterface $form_state) { 'query' => $query, ], 'callback' => [static::class, 'updateWidget'], // The AJAX system automatically moves focus to the first tabbable // element of the modal, so we need to disable refocus on the button. 'disable-refocus' => TRUE, ]; $form['actions']['submit']['#value'] = $this->t('Insert selected'); Loading Loading
core/misc/ajax.js +3 −1 Original line number Diff line number Diff line Loading @@ -1085,7 +1085,9 @@ const focusChanged = Object.keys(response || {}).some((key) => { const { command, method } = response[key]; return ( command === 'focusFirst' || (command === 'invoke' && method === 'focus') command === 'focusFirst' || command === 'openDialog' || (command === 'invoke' && method === 'focus') ); }); Loading
core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,9 @@ public function testUserFieldBlock() { $this->clickLink('Place block'); $assert_session->assertWaitOnAjaxRequest(); // Ensure that focus is on the first focusable element on modal. $this->assertJsCondition('document.activeElement === document.getElementsByClassName("block-filter-text")[0]'); // Ensure that fields without any formatters are not available. $assert_session->pageTextNotContains('Password'); // Ensure that non-display-configurable fields are not available. Loading
core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php +0 −3 Original line number Diff line number Diff line Loading @@ -527,9 +527,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen 'type' => 'throbber', 'message' => $this->t('Opening media library.'), ], // The AJAX system automatically moves focus to the first tabbable // element of the modal, so we need to disable refocus on the button. 'disable-refocus' => TRUE, ], // Allow the media library to be opened even if there are form errors. '#limit_validation_errors' => [], Loading
core/modules/media_library/src/Plugin/views/field/MediaLibrarySelectForm.php +0 −3 Original line number Diff line number Diff line Loading @@ -104,9 +104,6 @@ public function viewsForm(array &$form, FormStateInterface $form_state) { 'query' => $query, ], 'callback' => [static::class, 'updateWidget'], // The AJAX system automatically moves focus to the first tabbable // element of the modal, so we need to disable refocus on the button. 'disable-refocus' => TRUE, ]; $form['actions']['submit']['#value'] = $this->t('Insert selected'); Loading