Skip to content
Snippets Groups Projects
Commit 98f09e6a authored by Felipe Artur's avatar Felipe Artur
Browse files

Fix scroll blinking when colapsing/expanding sidebar menu

parent b1f924c1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,19 +2,20 @@ collapsed = 'page-sidebar-collapsed'
expanded = 'page-sidebar-expanded'
 
toggleSidebar = ->
$('.sidebar-wrapper').addClass('hide-sidebar')
$('.nicescroll').getNiceScroll().remove()
$('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}")
$('header').toggleClass("header-collapsed header-expanded")
$('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left")
$.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' })
 
setTimeout ( ->
niceScrollBars = $('.nicescroll').niceScroll();
niceScrollBars.updateScrollBar();
$('.sidebar-wrapper').removeClass('hide-sidebar')
$(".nicescroll").niceScroll(cursoropacitymax: '0.4', cursorcolor: '#FFF', cursorborder: "1px solid #FFF")
), 300
 
$(document).on("click", '.toggle-nav-collapse', (e) ->
e.preventDefault()
toggleSidebar()
)
 
Loading
Loading
Loading
Loading
@@ -20,6 +20,10 @@
transition-duration: .3s;
}
 
.hide-sidebar{
overflow: hidden !important;
}
.gitlab-text-container-link {
z-index: 1;
position: absolute;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment