Skip to content

Commit

Permalink
Fix #3122: Prevent overlay flickering
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 25, 2022
1 parent 3fa91b3 commit d9ec29c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions components/lib/dialog/Dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
position: relative;
}

/* Github #3122: Prevent animation flickering */
.p-dialog:not([class*='p-dialog-']) {
display: none;
}

.p-dialog-content {
overflow-y: auto;
flex-grow: 1;
Expand Down
3 changes: 2 additions & 1 deletion components/lib/dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@ export const Dialog = React.forwardRef((props, ref) => {
const otherProps = ObjectUtils.findDiffKeys(props, Dialog.defaultProps);
const className = classNames('p-dialog p-component', props.className, {
'p-dialog-rtl': props.rtl,
'p-dialog-maximized': maximized
'p-dialog-maximized': maximized,
'p-dialog-normal': !maximized
});
const maskClassName = classNames(
'p-dialog-mask',
Expand Down
4 changes: 4 additions & 0 deletions components/lib/overlaypanel/OverlayPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
margin-top: 10px;
}

/* Github #3122: Prevent animation flickering */
.p-overlaypanel:not([class*='p-overlaypanel-']) {
display: none;
}

.p-overlaypanel-flipped {
margin-top: 0;
Expand Down
5 changes: 5 additions & 0 deletions components/lib/sidebar/Sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
position: relative;
}

/* Github #3122: Prevent animation flickering */
.p-sidebar:not([class*="p-sidebar-"]){
display: none;
}

.p-sidebar-content {
overflow-y: auto;
flex-grow: 1;
Expand Down

0 comments on commit d9ec29c

Please sign in to comment.