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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page scrolls to bottom upon clicking a menu with modal: true #819

Closed
marbemac opened this issue Jan 5, 2021 · 1 comment 路 Fixed by #848
Closed

Page scrolls to bottom upon clicking a menu with modal: true #819

marbemac opened this issue Jan 5, 2021 · 1 comment 路 Fixed by #848

Comments

@marbemac
Copy link

marbemac commented Jan 5, 2021

馃悰 Bug report

Current behavior

Page scrolls to bottom upon clicking a menu with modal: true.

Steps to reproduce the bug

  1. Open https://reakit.io/docs/menu/#usage
  2. Replace const menu = useMenuState(); with const menu = useMenuState({ modal: true }); in the example code.
  3. Click on the Preferences button, and note how the page scrolls to the bottom. If you click it again without reloading the page it will work as expected - this only occurs on first open.

Expected behavior

Do not scroll to bottom of page when opening a menu.

Possible solutions

This issue was introduced with #801. I have checked out the commit prior to this change and the bug is not present.

Gif of behavior:

2021-01-04 20 51 10

@open-collective-bot
Copy link

Hey @marbemac 馃憢,

Thank you for opening an issue. We'll get back to you as soon as we can.
Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers.

If you use Reakit at work, you can also ask your company to sponsor us 鉂わ笍.

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