From fec3c57da33429678ac11e2d782b363e5ab2fa04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Wed, 23 Jul 2014 19:16:48 +0100 Subject: [PATCH] Don't hide the sidebar when "swiping" with the mouse on desktop --- js/glowingbear.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index 16968cd..5078ef6 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -885,8 +885,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', }; $scope.hideSidebar = function() { - document.getElementById('sidebar').setAttribute('data-state', 'hidden'); - document.getElementById('content').setAttribute('sidebar-state', 'hidden'); + if ($rootScope.isMobileUi()) { + document.getElementById('sidebar').setAttribute('data-state', 'hidden'); + document.getElementById('content').setAttribute('sidebar-state', 'hidden'); + } }; $scope.$watch('autoconnect', function() { if ($scope.autoconnect && !$rootScope.connected) {