Verified Commit 928467a9 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3152561 by lexbritvin, tim.plunkett, EricRondo, TwiiK: Layout Builder...

Issue #3152561 by lexbritvin, tim.plunkett, EricRondo, TwiiK: Layout Builder jumps to top when removing section/block

(cherry picked from commit 57366cba)
parent a977482f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -84,6 +84,10 @@ public function buildForm(array $form, FormStateInterface $form_state, SectionSt
      $form['actions']['cancel']['#attributes']['class'][] = 'dialog-cancel';
      $target_highlight_id = !empty($this->uuid) ? $this->blockUpdateHighlightId($this->uuid) : $this->sectionUpdateHighlightId($delta);
      $form['#attributes']['data-layout-builder-target-highlight-id'] = $target_highlight_id;
      // The AJAX system automatically moves focus to the first tabbable
      // element after closing a dialog, sometimes scrolling to a page top.
      // Disable refocus on the button.
      $form['actions']['submit']['#ajax']['disable-refocus'] = TRUE;
    }

    // Mark this as an administrative page for JavaScript ("Back to site" link).