Properly Show and hide the sidebar on mobile layout when using Alt+g
This commit is contained in:
parent
38be11fd24
commit
156640c3ba
2 changed files with 5 additions and 2 deletions
|
@ -605,7 +605,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
||||||
else if (code === 13) {
|
else if (code === 13) {
|
||||||
$event.preventDefault();
|
$event.preventDefault();
|
||||||
if ($scope.filteredBuffers.length > 0) {
|
if ($scope.filteredBuffers.length > 0) {
|
||||||
models.setActiveBuffer($scope.filteredBuffers[0].id);
|
$scope.setActiveBuffer($scope.filteredBuffers[0].id);
|
||||||
}
|
}
|
||||||
$scope.search = '';
|
$scope.search = '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ weechat.directive('inputBar', function() {
|
||||||
});
|
});
|
||||||
var activeBufferId = sortedBuffers[bufferNumber];
|
var activeBufferId = sortedBuffers[bufferNumber];
|
||||||
if (activeBufferId) {
|
if (activeBufferId) {
|
||||||
models.setActiveBuffer(activeBufferId[1]);
|
$scope.$parent.setActiveBuffer(activeBufferId[1]);
|
||||||
$event.preventDefault();
|
$event.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,6 +236,9 @@ weechat.directive('inputBar', function() {
|
||||||
// Alt+G -> focus on buffer filter input
|
// Alt+G -> focus on buffer filter input
|
||||||
if ($event.altKey && (code === 103 || code === 71)) {
|
if ($event.altKey && (code === 103 || code === 71)) {
|
||||||
$event.preventDefault();
|
$event.preventDefault();
|
||||||
|
if (!$scope.$parent.isSidebarVisible()) {
|
||||||
|
$scope.$parent.showSidebar();
|
||||||
|
}
|
||||||
document.getElementById('bufferFilter').focus();
|
document.getElementById('bufferFilter').focus();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue