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

Add hideOverlaysOnDocumentScrolling option to PrimeReact config #4448

Closed
mertsincan opened this issue May 24, 2023 · 3 comments
Closed

Add hideOverlaysOnDocumentScrolling option to PrimeReact config #4448

mertsincan opened this issue May 24, 2023 · 3 comments
Assignees
Labels
Core Team Issue or pull request has been *opened* by a member of Core Team Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@mertsincan
Copy link
Member

Define behavior if the browser window is scrolled while displaying an overlay panel like a Dropdown or Calendar. Depending on your organization's accessibility needs some prefer panels to be closed on scrolling and some prefer the overlay follow the scroll. Default value is false.

@mertsincan mertsincan added Type: New Feature Issue contains a new feature or new component request Core Team Issue or pull request has been *opened* by a member of Core Team labels May 24, 2023
@mertsincan mertsincan added this to the 9.5.0 milestone May 24, 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 May 24, 2023
@mertsincan mertsincan removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 24, 2023
@krawieckamil
Copy link

@melloware What about the case when we have a structure like this:

<Dialog>
    <Dropdown />
<Dialog />

and appendTo set to default (document.body)
I think that hideOverlaysOnDocumentScrolling should take into consideration the current appendTo property as a parent. addScrollableParent in DomHandler adds the parent of the dropdown which is a dialog content, not a body element, so the closing mechanism does not trigger.

@melloware
Copy link
Member

Yep can you open another ticket @krawieckamil and I will look at it. It should absolutely close inside dialogs as well if this setting is used.

@melloware
Copy link
Member

@krawieckamil I just tested it and its working for DropDown inside the dialog. When I scroll inside the dialog the DropDown closes? Here is a reproducer: https://stackblitz.com/edit/react-tm6qh2?file=src%2FApp.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Team Issue or pull request has been *opened* by a member of Core Team Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

3 participants