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

Unexpected body scrolls when using Menu with modal: true #856

Closed
tkhquang opened this issue Apr 3, 2021 · 2 comments
Closed

Unexpected body scrolls when using Menu with modal: true #856

tkhquang opened this issue Apr 3, 2021 · 2 comments
Labels

Comments

@tkhquang
Copy link

tkhquang commented Apr 3, 2021

馃悰 Bug report

Current behavior

Possibly related: #803, #819

While triggering the menu dialog, layout unexpectedly scrolls to other position. This only happens with modal: true in the useMenuState hook. Same result if I manually wrap Menu inside a reakit Portal

Steps to reproduce the bug

  1. Open the sandbox: https://codesandbox.io/s/cool-tree-ny0li?file=/src/App.js
  2. Scroll down the page by some margin
  3. Click on the menu trigger
  4. Repeat the step 2-3 about 3 or 4 times if not yet happen

Expected behavior

The layout should stay in place (not be scrolled) when triggering the menu.

Environment

 System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz
    Memory: 107.96 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.15.3 - ~/.asdf/installs/nodejs/14.15.3/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.9 - ~/.asdf/installs/nodejs/14.15.3/bin/npm
  Browsers:
    Chrome: 89.0.4389.114
    Firefox Developer Edition: 88.0
    Safari: 14.0
  npmPackages:
    react: ^17.0.1 => 17.0.1
    react-dom: ^17.0.1 => 17.0.1
    react-is: ^17.0.1 => 17.0.1
    reakit: ^1.1.1 => 1.3.7
@open-collective-bot
Copy link

Hey @tkhquang 馃憢,

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 鉂わ笍.

@diegohaz diegohaz added bug and removed potential bug labels Apr 3, 2021
@diegohaz
Copy link
Member

Closing as this has been fixed in v2: https://codesandbox.io/s/affectionate-buck-zn8h0n?file=/src/App.js

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

No branches or pull requests

2 participants