Commit 5592f358 authored by Phil Hughes's avatar Phil Hughes

Merge branch '202109' into 'master'

Update main JavaScript file to only apply right sidebar CSS class when an aside is present

See merge request gitlab-org/gitlab!25164
parents d3a5ea71 d9f401c4
...@@ -201,9 +201,15 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -201,9 +201,15 @@ document.addEventListener('DOMContentLoaded', () => {
}); });
if (bootstrapBreakpoint === 'sm' || bootstrapBreakpoint === 'xs') { if (bootstrapBreakpoint === 'sm' || bootstrapBreakpoint === 'xs') {
const $rightSidebar = $('aside.right-sidebar, .layout-page'); const $rightSidebar = $('aside.right-sidebar');
const $layoutPage = $('.layout-page');
$rightSidebar.removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed'); if ($rightSidebar.length > 0) {
$rightSidebar.removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed');
$layoutPage.removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed');
} else {
$layoutPage.removeClass('right-sidebar-expanded right-sidebar-collapsed');
}
} }
// prevent default action for disabled buttons // prevent default action for disabled buttons
......
---
title: update main javascript file to only apply right sidebar class when an aside
is present
merge_request:
author: Oregand
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment