From 779f8cd2cb6e095a66747269adeb439cbbb5d059 Mon Sep 17 00:00:00 2001
From: bnjmnm <benm@umich.edu>
Date: Thu, 6 Jul 2023 14:16:54 -0400
Subject: [PATCH] Issue #3372638 by lauriii, smustgrave: Page scrolls when
 element inside bulk operations is focused

---
 core/themes/claro/js/tableselect.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/themes/claro/js/tableselect.js b/core/themes/claro/js/tableselect.js
index feaffa10caf3..b4024384b6fe 100644
--- a/core/themes/claro/js/tableselect.js
+++ b/core/themes/claro/js/tableselect.js
@@ -89,6 +89,10 @@
      *   A jQuery Event object.
      */
     focusHandler(event) {
+      // Do not scroll down when element inside bulk actions is focused.
+      if (event.currentTarget.closest('[data-drupal-views-bulk-actions]')) {
+        return;
+      }
       const stickyRect = this.bulkActions.getBoundingClientRect();
       const stickyStart = stickyRect.y;
       const elementRect = event.target.getBoundingClientRect();
-- 
GitLab