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

PrimeReactProvider: Panels closing on scroll even with hideOverlaysOnDocumentScrolling: false #5332

Closed
MBR-0001 opened this issue Nov 16, 2023 · 5 comments · Fixed by #5334
Closed
Assignees
Labels
Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@MBR-0001
Copy link

Describe the bug

Setting hideOverlaysOnDocumentScrolling: false in PrimeReactProvider does not keep the overlays open when scrolling, check reproducer

Reproducer

https://codesandbox.io/s/primereact-forked-pdt7mn?file=/src/index.js:1025-1063

PrimeReact version

10.0.9

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Open a dropdown
  2. Scroll
  3. Observe that the dropdown panel closed

Expected behavior

Dropdown panel remains open

@MBR-0001 MBR-0001 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 16, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 16, 2023
@melloware
Copy link
Member

Issue was caused by this fix: #4819

melloware added a commit to melloware/primereact that referenced this issue Nov 16, 2023
@melloware melloware self-assigned this Nov 16, 2023
@melloware melloware added this to the 10.0.10 milestone Nov 16, 2023
kl-nevermore pushed a commit to Realmerit-UEX/primereact that referenced this issue Nov 17, 2023
@MBR-0001
Copy link
Author

Doesn't seem to be fixed, still occurring in 10.2.1 https://codesandbox.io/p/sandbox/primereact-forked-65n5gl

@melloware melloware reopened this Nov 30, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 30, 2023
@melloware melloware removed this from the 10.1.0 milestone Nov 30, 2023
@melloware
Copy link
Member

I will take a look. It works for me in the showcase but let me boil and example down to just like yours there must be something different.

@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 30, 2023
@melloware
Copy link
Member

OK in the showcase this is working fine. but I can see your example is not trying to figure out why.

@melloware
Copy link
Member

@MBR-0001 i found the difference. It is because its attaching to Window and not body.

I added this CSS

body {
  margin: 0px;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--surface-ground);
  font-weight: normal;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

And now it works fine.

https://codesandbox.io/p/sandbox/primereact-forked-75lqfn

@melloware melloware added the Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team label Dec 1, 2023
@melloware melloware added this to the 10.1.0 milestone Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants