From ad0f70ab348ef1e69135b64fe3baba53d6b0ac40 Mon Sep 17 00:00:00 2001 From: Vulich Fernando <46904390+fvulich@users.noreply.github.com> Date: Fri, 29 Nov 2019 13:19:13 -0300 Subject: [PATCH] Fix Keyboard shortcuts for switching apps do not focus the app fixes #2461 --- app/view/main/MainController.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/view/main/MainController.js b/app/view/main/MainController.js index 8b756a0c..d3bd3d57 100644 --- a/app/view/main/MainController.js +++ b/app/view/main/MainController.js @@ -42,10 +42,13 @@ Ext.define('Rambox.view.main.MainController', { } var webview = newTab.down('component').el.dom; - if ( webview ) { - tabPanel.getActiveTab().getWebView().blur(); - tabPanel.getActiveTab().getWebView().focus(); - } + + setTimeout(function () { + if ( webview ) { + tabPanel.getActiveTab().getWebView().blur(); + tabPanel.getActiveTab().getWebView().focus(); + } + }, 300); // Update the main window so it includes the active tab title. if ( Rambox.app.getTotalNotifications() > 0 ) {