From d97d68a26ed1db0c145694741d0c441163d6d4c1 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Tue, 18 Jun 2024 13:55:21 -0400 Subject: [PATCH] Previewer: Prevent focus from scrolling when clicking a listbox option Fixes #130 --- source/wp-content/themes/wporg-themes-2024/src/utils/listbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/wp-content/themes/wporg-themes-2024/src/utils/listbox.js b/source/wp-content/themes/wporg-themes-2024/src/utils/listbox.js index 0548390..271a151 100644 --- a/source/wp-content/themes/wporg-themes-2024/src/utils/listbox.js +++ b/source/wp-content/themes/wporg-themes-2024/src/utils/listbox.js @@ -36,7 +36,7 @@ class wporgListbox { } // Focus the container. - element.closest( 'ul' ).focus(); + element.closest( 'ul' ).focus( { preventScroll: true } ); this.current = element.dataset.index * 1;