diff --git a/app/js/controllers.js b/app/js/controllers.js index 228f3ab1..b7d18418 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -1397,7 +1397,8 @@ angular.module('myApp.controllers', ['myApp.i18n']) } function toggleMessage (messageID, $event) { - if ($scope.historyState.startBot) { + if ($scope.historyState.startBot || + $rootScope.idle.afterFocus) { return false; } diff --git a/app/js/lib/ng_utils.js b/app/js/lib/ng_utils.js index 77f7cda6..352661de 100644 --- a/app/js/lib/ng_utils.js +++ b/app/js/lib/ng_utils.js @@ -1005,6 +1005,13 @@ angular.module('izhukov.utils', []) }, 30000); } + if (e.type == 'focus' && !$rootScope.idle.afterFocus) { + $rootScope.idle.afterFocus = true; + setTimeout(function () { + delete $rootScope.idle.afterFocus; + }, 10); + } + if ($rootScope.idle.isIDLE == isIDLE) { return; }