Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content jumps when opening and closing search on desktop #784

Open
baldurh opened this issue Oct 17, 2021 · 2 comments
Open

Content jumps when opening and closing search on desktop #784

baldurh opened this issue Oct 17, 2021 · 2 comments

Comments

@baldurh
Copy link
Contributor

baldurh commented Oct 17, 2021

Describe the current behavior

Content jumps when opening and closing the search on desktop

dawn-search-before

Describe the expected behavior

Content should not jump

dawn-search-after

Version information (Dawn, browsers and operating systems)

  • Dawn Version: 2.3.0
  • Chrome Version 94.0.4606.81
  • macOS Version 11.6

Possible solution

.overflow-hidden {
    position: fixed;
    height: 100vh;
    width: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
}
@TotalJabroni
Copy link

@baldurh There are some slight complications when using this approach in conjunction with the "sticky header" functionality. Once scrolled down the page and utilizing the search it jumps back up the the top of the page.

Screen Recording 2021-10-18 at 1 19 03 PM

I'm trying a couple other options at the moment and I'll let you know if I come up with a solution.

@baldurh
Copy link
Contributor Author

baldurh commented Oct 19, 2021

right, yes you’d need to capture the scroll position and set the negative of that to top. Then the body is fixed at the correct position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants