hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

[BUG] Page scrolls when typing in search input field

Open cavellblood opened this issue 2 years ago • 2 comments

Describe the bug The page scrolls up when typing in the search input field. Actually it will scroll up when you're typing in any input field on the page until it gets to the top of the page.

To Reproduce

  • StackBlitz sandbox

  • Scroll down on the home page or any page.

  • Begin typing anything in the search box.

  • The page will begin to scroll up when typing

Expected behaviour Not to scroll when typing

Screenshots

https://user-images.githubusercontent.com/727740/187298972-a26fd889-0ec2-4041-af51-85b86fe3a840.mov

https://user-images.githubusercontent.com/727740/187300172-f73caadd-6f46-4e61-ad3c-436bd87d6578.mov

cavellblood avatar Aug 29 '22 21:08 cavellblood

Upon further testing it doesn't seem to jump when typing into an input that is on other areas of the page. Seems like it's related to the search input being in a div with position: sticky.

cavellblood avatar Aug 29 '22 21:08 cavellblood

I also noticed that it jumps when tabbing through any links in the header as well.

cavellblood avatar Aug 29 '22 22:08 cavellblood

Oxygen deployed a preview of your fd-update-clikit branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
skeleton ✅ Successful (Logs) Preview deployment Inspect deployment April 30, 202412:37 PM

Learn more about Hydrogen's GitHub integration.

shopify[bot] avatar Apr 30 '24 12:04 shopify[bot]