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

Focus trap on Popover scrolls to top, which causes popover below the fold to be hidden #1073

Open
dgiraldo313 opened this issue May 20, 2021 · 0 comments
Labels

Comments

@dgiraldo313
Copy link
Collaborator

Describe the bug
When the popover is used on a section below the fold and the focusTrap is set to true, on open the page scroll is removed (I think) which causes the page to go all the way to the top. As a result, the popover

Affected project(s) (e.g. pcln-design-system, pcln-modal, etc.)

  • pcln-popover

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Popover storybook and add a story with the popover trigger placed below the fold
  2. Make sure that trapFocus is set to true
  3. Click on the trigger link to open the popover
  4. You should see page scrolled to the top and the popover content out of view

Expected behavior
When using the focus trap we should see focus delegation limited to the content inside the popover, however this should not come at the expense of removing the page scroll.

Screenshots
image
image
After clicking on the popover trigger, the page is scrolled to the top and the Popover content is not visible
image
The popover content can then be found by scrolling to the position

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

1 participant