Revert "prevent auto-scroll when focus is set inside header panels" (#14829)

Revert “prevent auto-scroll when focus is set inside header panels” (#14829)

This reverts commit f444e3e3f704ef71c29d57461018b3a292ef905f.

diff --git a/app/assets/javascripts/discourse/app/widgets/header.js b/app/assets/javascripts/discourse/app/widgets/header.js
index 3e6b096..8adbe4d 100644
--- a/app/assets/javascripts/discourse/app/widgets/header.js
+++ b/app/assets/javascripts/discourse/app/widgets/header.js
@@ -484,9 +484,7 @@ export default createWidget("header", {
 
     // auto focus on first button in dropdown
     schedule("afterRender", () =>
-      document.querySelector(".user-menu button")?.focus({
-        preventScroll: true,
-      })
+      document.querySelector(".user-menu button")?.focus()
     );
   },
 
@@ -496,9 +494,7 @@ export default createWidget("header", {
 
     // auto focus on first link in dropdown
     schedule("afterRender", () => {
-      document.querySelector(".hamburger-panel .menu-links a")?.focus({
-        preventScroll: true,
-      });
+      document.querySelector(".hamburger-panel .menu-links a")?.focus();
     });
   },
 
@@ -628,9 +624,7 @@ export default createWidget("header", {
     if (this.state.searchVisible) {
       schedule("afterRender", () => {
         const searchInput = document.querySelector("#search-term");
-        searchInput.focus({
-          preventScroll: true,
-        });
+        searchInput.focus();
         searchInput.select();
       });
     }

GitHub sha: 641f49748db19f6abb261d271ca46890b1f5b995

This commit appears in #14829 which was approved by tgxworld. It was merged by tgxworld.