primereact
primereact copied to clipboard
Calendar: page scroll behaviour
Describe the bug
Calendar panel may be displayed over the other elements on the page after page scroll.
Reproducer
https://codesandbox.io/s/primereact-calendar-bug-demo-hjryot
PrimeReact version
8.4.0
React version
17.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome latest
Steps to reproduce the behavior
Conditions:
page has fixed element with z-index: 1 (or higher but less then Calendar panel)
page can be scrolled in a proper way (see Reproducer demo)
- Open Calendar
- Scroll the page
- Pay attention to the result.
Expected behavior
Calendar is closed after scroll event occur. Or this behaviour can be enabled with prop closeOnScroll set to true.
Duplicate of: https://github.com/primefaces/primereact/pull/2757
Duplicate of: #2757
@melloware
As far as I can see PR #2757 will not fix issue with Calendar component. Because hook useOverlayScrollListener is not used in the Calendar component. Please check this.
Yep will re-open
Can't reproduce in 10.1.0: https://codesandbox.io/s/primereact-calendar-bug-demo-forked-g52mql?file=/src/demo/index.js
We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.