patternfly / patternfly-react

A set of React components for the PatternFly project.
https://react-staging.patternfly.org/
MIT License
795 stars 357 forks source link

Bug - Popover - Translation is not behaving correctly (noticeable in datepicker) #8445

Open rh-gvincent opened 1 year ago

rh-gvincent commented 1 year ago

Describe the problem If you open the Calendar view by clicking multiple times on the calendar icon on the DatePicker component, you will see that the calendar popover position changes.

How do you reproduce the problem?

Go on https://www.patternfly.org/v4/components/date-picker/ an click multiple times on the calendar icon See screenshot

Expected behavior Popover position should not change

Screenshots

Screen Recording 2022-12-14 at 17 28 20

What is your environment?

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

Any other information?

If you look at the style of the popover between click, you will see the translate3d values changing

popover style on the first click: opacity: 1; transition: opacity 300ms cubic-bezier(0.54, 1.5, 0.38, 1.11) 0s; position: absolute; inset: 0px auto auto 0px; z-index: 9999; transform: translate3d(217.5px, -152.5px, 0px); popover style on the second click: opacity: 1; transition: opacity 300ms cubic-bezier(0.54, 1.5, 0.38, 1.11) 0s; position: absolute; inset: 0px auto auto 0px; transform: translate3d(0px, 61px, 0px); z-index: 9999; third: opacity: 1; transition: opacity 300ms cubic-bezier(0.54, 1.5, 0.38, 1.11) 0s; position: absolute; inset: 0px auto auto 0px; transform: translate3d(217.5px, 0px, 0px); z-index: 9999; fourth: opacity: 1; transition: opacity 300ms cubic-bezier(0.54, 1.5, 0.38, 1.11) 0s; position: absolute; inset: 0px auto auto 0px; transform: translate3d(0px, 61px, 0px); z-index: 9999;

nicolethoen commented 1 year ago

possibly the issue is coming from: https://github.com/patternfly/patternfly-react/blob/9866c1a43993d32c3155dfa3851acabe9602c785/packages/react-core/src/helpers/Popper/thirdparty/popper-core/modifiers/computeStyles.ts#L69-L90

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.