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

OverlayPanel: Toggle on list of focusable elements forces screen jump #4167

Closed
zachlearnscode opened this issue Jul 19, 2023 · 0 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@zachlearnscode
Copy link

Describe the bug

When using the OverlayPanel on a list of elements, if those elements are focusable (ie buttons or anchors), then the page 'jumps' to the OverlayPanel's last target. This is really only noticeable if the first target has been scrolled off screen.

Reproducer

https://codesandbox.io/s/peaceful-dan-m35nr6?file=/src/App.vue

PrimeVue version

^3.9.1

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Click on any of the buttons to toggle the overlay
  2. Leave the overlay open or close it, scroll the original target off screen
  3. Click a different button to toggle the overlay
  4. Notice that the screen jumps back to original target
  5. Notice that the overlay does appear on the new target
  6. Repeat the process with the nonfocusable span elements, and note the expected behavior.

Expected behavior

The screen should not jump to the location of a previous target when when an overlay is rendered on a list of focusable elements.

@zachlearnscode zachlearnscode added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 19, 2023
@mertsincan mertsincan self-assigned this Jul 20, 2023
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 20, 2023
@mertsincan mertsincan added this to the 3.30.2 milestone Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants