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

Bug - Table - Page/table gets auto scrolled while clicking on some row actions #10790

Closed
burhanQuartic opened this issue Jul 22, 2024 · 7 comments · Fixed by #10797
Closed

Bug - Table - Page/table gets auto scrolled while clicking on some row actions #10790

burhanQuartic opened this issue Jul 22, 2024 · 7 comments · Fixed by #10797
Assignees

Comments

@burhanQuartic
Copy link

Describe the problem
This is an issue with

  • Patternfly 5

when the user clicks on the some row actions, the page/table gets scrolled automatically

How do you reproduce the problem?
This issue can be reproduced on the patternfly table demo component as well. https://www.patternfly.org/components/table/#modifiers-with-table-text

Expected behavior
The page/table should not get randomly scrolled on clicking the row action.

What is your environment?

  • OS: Ubuntu 20.04.6 LTS
  • Browser chrome
  • Version 125.0.6422.60

What is your product and what release date are you targeting?
August 2024

@thatblindgeye thatblindgeye transferred this issue from patternfly/patternfly Jul 22, 2024
@thatblindgeye thatblindgeye self-assigned this Jul 22, 2024
@thatblindgeye
Copy link
Contributor

@burhanQuartic I moved this over to our React repo. Updating where the action menu gets appended may help resolve this by passing something along the lines of popperProps={{appendTo: () => document.body}} (it'd be worth trying to append to an element closer to the trigger than the document body is possible).

Depending on the implementation, if you're using our Dropdown or Select components you could pass that to the outermost element, <Dropdown> or <Select>. or you can pass that to the table's <ActionsColumn>

@burhanQuartic
Copy link
Author

@thatblindgeye I tried appending it to an element closer to the trigger but that also didn't worked.

@thatblindgeye
Copy link
Contributor

@burhanQuartic we merged a PR that should be included in our next version 5 release that should help alleviate the issue. An alternative workaround for now would be to update the appendTo to the document body (rather than as close to the trigger as possible).

@burhanQuartic
Copy link
Author

@thatblindgeye we have updated the patternfly version to the latest, but still the issue is there.

@thatblindgeye
Copy link
Contributor

@burhanQuartic can you confirm the version number of @patternfly/react-core that you tested?

@burhanQuartic
Copy link
Author

@thatblindgeye we tested on @patternfly/react-core version 5.4.0

@thatblindgeye
Copy link
Contributor

Gotcha, was just wondering because we merged a PR that might actually help resolve this issue (tweaking the timeout of our auto-focus logic), and that is part of version 5.4.1

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

Successfully merging a pull request may close this issue.

2 participants