This is an automated email from the ASF dual-hosted git repository.

akuznetsov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 5bb41d8  IGNITE-8518 Web Console: Fixed issue with auto focus.
5bb41d8 is described below

commit 5bb41d8745c2f71291227fd0ead1eef0b2de031c
Author: Vasiliy Sisko <vsi...@gridgain.com>
AuthorDate: Mon Jan 14 18:18:56 2019 +0700

    IGNITE-8518 Web Console: Fixed issue with auto focus.
---
 .../frontend/app/components/form-field/showValidationError.directive.js | 2 +-
 .../components/page-queries/components/queries-notebook/controller.ts   | 2 +-
 modules/web-console/frontend/app/directives/auto-focus.directive.js     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/modules/web-console/frontend/app/components/form-field/showValidationError.directive.js
 
b/modules/web-console/frontend/app/components/form-field/showValidationError.directive.js
index 31a8f2d..7560b90 100644
--- 
a/modules/web-console/frontend/app/components/form-field/showValidationError.directive.js
+++ 
b/modules/web-console/frontend/app/components/form-field/showValidationError.directive.js
@@ -54,7 +54,7 @@ export function directive($timeout) {
                         el[0].scrollIntoView();
 
                     if (!attr.bsSelect)
-                        $timeout(() => el[0].focus());
+                        $timeout(() => el[0].focus(), 100);
 
                     formFieldController && 
formFieldController.notifyAboutError();
                 });
diff --git 
a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts
 
b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts
index 78274e6..d841cb5 100644
--- 
a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts
+++ 
b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts
@@ -1817,7 +1817,7 @@ export class NotebookCtrl {
         $scope.dblclickMetadata = function(paragraph, node) {
             paragraph.ace.insert(node.name);
 
-            setTimeout(() => paragraph.ace.focus(), 1);
+            setTimeout(() => paragraph.ace.focus(), 100);
         };
 
         $scope.importMetadata = function() {
diff --git 
a/modules/web-console/frontend/app/directives/auto-focus.directive.js 
b/modules/web-console/frontend/app/directives/auto-focus.directive.js
index 8d269ce..e67b50d 100644
--- a/modules/web-console/frontend/app/directives/auto-focus.directive.js
+++ b/modules/web-console/frontend/app/directives/auto-focus.directive.js
@@ -27,7 +27,7 @@ export default function directive($timeout) {
          * @param {JQLite} element
          */
         link(scope, element) {
-            $timeout(() => element[0].focus());
+            $timeout(() => element[0].focus(), 100);
         }
     };
 }

Reply via email to