Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzekiel Kigbo <ekigbo@gitlab.com>2019-03-04 08:57:40 +0300
committerEzekiel Kigbo <ekigbo@gitlab.com>2019-03-04 16:58:23 +0300
commite4f9c3f63ad7e8147acecd2324de90b63ffcd940 (patch)
tree270c67e86a3080d34da75ef1db59ba33166f83fd /app/assets/javascripts/contextual_sidebar.js
parent3e42a0c175d43609ea7b12f39ca3caae22eea817 (diff)
Fix collapsing behaviour at 1200px
Diffstat (limited to 'app/assets/javascripts/contextual_sidebar.js')
-rw-r--r--app/assets/javascripts/contextual_sidebar.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/assets/javascripts/contextual_sidebar.js b/app/assets/javascripts/contextual_sidebar.js
index 8561383c574..8e2ff314434 100644
--- a/app/assets/javascripts/contextual_sidebar.js
+++ b/app/assets/javascripts/contextual_sidebar.js
@@ -47,9 +47,9 @@ export default class ContextualSidebar {
// TODO: use the breakpoints from breakpoints.js once they have been updated for bootstrap 4
// See related issue and discussion: https://gitlab.com/gitlab-org/gitlab-ce/issues/56745
- static isDesktopBreakpoint = () => bp.windowWidth() > 1200;
+ static isDesktopBreakpoint = () => bp.windowWidth() >= 1200;
static setCollapsedCookie(value) {
- if (bp.getBreakpointSize() !== 'lg') {
+ if (!ContextualSidebar.isDesktopBreakpoint()) {
return;
}
Cookies.set('sidebar_collapsed', value, { expires: 365 * 10 });
@@ -92,12 +92,11 @@ export default class ContextualSidebar {
render() {
if (!this.$sidebar.length) return;
- const breakpoint = bp.getBreakpointSize();
if (!ContextualSidebar.isDesktopBreakpoint()) {
this.toggleSidebarNav(false);
- } else if (breakpoint === 'lg') {
+ } else {
const collapse = parseBoolean(Cookies.get('sidebar_collapsed'));
- this.toggleCollapsedSidebar(collapse, false);
+ this.toggleCollapsedSidebar(collapse, true);
}
}
}