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

[forge-autocomplete] autocompletes used in dialogs can cause browser to jump to top of page after second selection #377

Open
cstaib1 opened this issue Sep 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@cstaib1
Copy link

cstaib1 commented Sep 15, 2023

Describe the bug:
When opening a forge-dialog at the bottom of a vertically scrollable page, if I click an autocomplete with multiple enabled to select options then click away from the autocomplete and click it to select more options, the page in the background of the dialog will jump to the top. I've only been able to replicate this on autocompletes with a lot of options, in our case, ~400+.

To Reproduce:
Steps to reproduce the behavior:

  1. Create a simple page with enough height to scroll.
  2. Scroll to the bottom of the page.
  3. Prompt a forge-dialog that contains a multiple select autocomplete with at least 400 options.
  4. Click 1-2 options in the autocomplete dropdown to select them.
  5. Click away from the autocomplete, but still on the dialog. (Click other components will also work here as long as they are on the dialog)
  6. Click the autocomplete to prompt the dropdown options to display.
  7. Notice the page (behind the dialog) has now jumped to the top.

Expected behavior:
The popup menu generated by autocompletes should not cause the background page to move when selecting options on an autocomplete or any other component nested within.

Screenshots:
N/A

Please complete the following information:

  • Forge version: 2.16.3 (Tested with 2.16.6 and still present)
  • I have searched existing issues before creating this report? Y
  • Browser: Chrome
  • Platform: Desktop
  • OS: Windows

Additional context:
I mentioned this as an issue last year around October on call with Kieran, but had not made an issue on github to report it. It was explained to be a bug when we talked about it and appeared to come from the popup menu for autocompletes first rendering to the top left of pages then transforming to the location of the autocomplete element. If more additional context is needed, feel free to contact me on Teams and I can provide a live demo of the issue.

@cstaib1 cstaib1 added the bug Something isn't working label Sep 15, 2023
@DRiFTy17
Copy link
Collaborator

I spent a bit today trying to replicate this issue, but I didn't have any luck...

Could you create a reproduction in StackBlitz potentially? Otherwise, we could hop on a call and screen share to debug on your machine as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants