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

feat(qwik-city): scroll restoration any element #6258

Merged
merged 3 commits into from
May 7, 2024

Conversation

genki
Copy link
Contributor

@genki genki commented May 7, 2024

Overview

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos

Description

The scroll restoration is very neat feature of the Qwik-city.
I would like to add a feat to change the scroller element from the documentElement to other one.

Use cases and why

Nowadays, there are various ways to layout a web page.
Particularly when using CSS Grid and other modern techniques, it's common to have a scrollable element other than the documentElement as the main scrolling container of the page.
This update is intended to support such cases.

If you want to specify the scroller element, you can do it by set its id to {QWIK_CITY_SCROLLER}.
Otherwise no changes happen.

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

@PatrickJS
Copy link
Member

awesome!

@PatrickJS PatrickJS changed the title feat(qwik-city): Enable to change the scroller element to other than the documentElement feat(qwik-city): scroll restoration any element May 7, 2024
@PatrickJS PatrickJS merged commit 4771896 into QwikDev:main May 7, 2024
21 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants