Merge pull request #1490 from MasterEnoc/sidebar

Fix sidebar when the mouse leaves the window
pull/1496/head
Simon Legner 4 years ago committed by GitHub
commit e9d7849412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,10 +28,14 @@ class app.views.Sidebar extends app.View
app.on 'ready', @onReady app.on 'ready', @onReady
$.on document.documentElement, 'mouseleave', (event) => @display() unless event.clientX <= 0 $.on document.documentElement, 'mouseleave', => @hide()
$.on document.documentElement, 'mouseenter', => @resetDisplay(forceNoHover: false) $.on document.documentElement, 'mouseenter', => @resetDisplay(forceNoHover: false)
return return
hide: ->
@removeClass 'show'
return
display: -> display: ->
@addClass 'show' @addClass 'show'
return return

Loading…
Cancel
Save