Only toggle the Header on LMB.

This commit is contained in:
Nicolas Stepien 2013-04-01 05:05:04 +02:00
parent c68f1a3809
commit e3ca8f280d
2 changed files with 3 additions and 3 deletions

View File

@ -191,8 +191,7 @@ UI = do ->
dragstart = (e) ->
if e.type is 'mousedown' and e.button isnt 0 # not LMB
return
return if e.type is 'mousedown' and e.button isnt 0 # not LMB
# prevent text selection
e.preventDefault()
if isTouching = e.type is 'touchstart'

View File

@ -131,7 +131,8 @@ Header =
setBarVisibility: (hide) ->
Header.headerToggler.firstElementChild.checked = hide
(if hide then $.addClass else $.rmClass) Header.bar, 'autohide'
toggleBarVisibility: ->
toggleBarVisibility: (e) ->
return if e.type is 'mousedown' and e.button isnt 0 # not LMB
hide = if @nodeName is 'INPUT'
@checked
else