From e3ca8f280d99927f55865ba43e0ac2accf95e1ef Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 1 Apr 2013 05:05:04 +0200 Subject: [PATCH] Only toggle the Header on LMB. --- lib/ui.coffee | 3 +-- src/features.coffee | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui.coffee b/lib/ui.coffee index 64d99b529..f83d84065 100644 --- a/lib/ui.coffee +++ b/lib/ui.coffee @@ -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' diff --git a/src/features.coffee b/src/features.coffee index 21d976fb1..0fa251320 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -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