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

Fix - #5271 sidebar fullscreen unnecessary class assignments fix #5272

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions components/lib/sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ export const Sidebar = React.forwardRef((inProps, ref) => {
return sidebarRef && sidebarRef.current && !sidebarRef.current.contains(event.target);
};

const getPositionClass = () => {
const positions = ['left', 'right', 'top', 'bottom'];
const pos = positions.find((item) => item === props.position);

return pos ? `p-sidebar-${pos}` : '';
};

const focus = () => {
const activeElement = document.activeElement;
const isActiveElementInDialog = activeElement && sidebarRef && sidebarRef.current.contains(activeElement);
Expand Down
6 changes: 3 additions & 3 deletions components/lib/sidebar/SidebarBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const classes = {

return classNames(
'p-sidebar-mask',
pos ? `p-sidebar-${pos}` : '',
pos && !props.fullScreen ? `p-sidebar-${pos}` : '',
{
'p-component-overlay p-component-overlay-enter': props.modal,
'p-sidebar-mask-scrollblocker': props.blockScroll,
Expand Down Expand Up @@ -94,8 +94,8 @@ const styles = `
.p-sidebar-full .p-sidebar {
transition: none;
transform: none;
width: 100vw !important;
height: 100vh !important;
width: 100vw;
height: 100vh;
max-height: 100%;
top: 0px !important;
left: 0px !important;
Expand Down
Loading