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

[Catalyst] Dialog component destroys behavior of nextjs link component #1666

Open
real-marty opened this issue Feb 4, 2025 · 0 comments
Open

Comments

@real-marty
Copy link

real-marty commented Feb 4, 2025

What component (if applicable)

  • URL for category: Stacked Layout
  • Component name: The issue is related to the Dialog component

Describe the bug

If a user is not scrolled all the way up and navigates to another page, the page remains scrolled to the same position as the previous page.

This issue is caused by the Dialog component adding the following styles to the html:

overflow: hidden;
padding-right: 17px;

These styles make Next.js <Link> components behave unexpectedly. This behavior only occurs on mobile devices and is difficult to detect.

To Reproduce

Steps to reproduce the behavior:

  1. Create two long pages.
  2. Add the sidebar with the navbar set as sticky to the top.
  3. Scroll down halfway and click a <Link> tag.
  4. The next page will also be scrolled down (instead of being at the top as expected).

Expected behavior

The Dialog component should not apply these styles so that navigation can function correctly when fixed or sticky positioning is used.

Browser/Device (if applicable)

  • OS: iOS / android
  • Browser: Chrome, Safari
  • Version: All versions

Additional context

Villing to provide more informations if needed. And sample app, where it behaves unexpectedly.

The issue is also on the stack overflow here:

https://stackoverflow.com/a/76449161/20791908

@real-marty real-marty changed the title Dialog component destroys behavior of nextjs link component [Catalyst] Dialog component destroys behavior of nextjs link component Feb 4, 2025
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

1 participant