Browse Source

Fixed first click after forces

Closes #858
master
Igor Zhukov 9 years ago
parent
commit
90df02e10b
  1. 3
      app/js/controllers.js
  2. 7
      app/js/lib/ng_utils.js

3
app/js/controllers.js

@ -1397,7 +1397,8 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -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;
}

7
app/js/lib/ng_utils.js

@ -1005,6 +1005,13 @@ angular.module('izhukov.utils', []) @@ -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;
}

Loading…
Cancel
Save