Fixed first click after forces

Closes #858
This commit is contained in:
Igor Zhukov 2015-07-26 22:01:27 +03:00
parent e828e25a7a
commit 90df02e10b
2 changed files with 9 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}