Auto-close keyboard when opening sidebar (bufferlist)
This is for mobile
This commit is contained in:
parent
e46efba5cf
commit
ae5f0effcf
1 changed files with 6 additions and 0 deletions
|
@ -907,6 +907,12 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
$scope.showSidebar = function() {
|
||||
document.getElementById('sidebar').setAttribute('data-state', 'visible');
|
||||
document.getElementById('content').setAttribute('sidebar-state', 'visible');
|
||||
if ($rootScope.isMobileUi()) {
|
||||
// de-focus the input bar when opening the sidebar on mobile, so that the keyboard goes down
|
||||
_.each(document.getElementsByTagName('textarea'), function(elem) {
|
||||
elem.blur();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$rootScope.hideSidebar = function() {
|
||||
|
|
Loading…
Reference in a new issue