IGNITE-8518 Web Console: Fixed issue with auto focus.
authorVasiliy Sisko <vsisko@gridgain.com>
Mon, 14 Jan 2019 11:18:56 +0000 (18:18 +0700)
committerAlexey Kuznetsov <akuznetsov@apache.org>
Mon, 14 Jan 2019 11:18:56 +0000 (18:18 +0700)
modules/web-console/frontend/app/components/form-field/showValidationError.directive.js
modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts
modules/web-console/frontend/app/directives/auto-focus.directive.js

index 31a8f2d..7560b90 100644 (file)
@@ -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();
                 });
index 78274e6..d841cb5 100644 (file)
@@ -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() {
index 8d269ce..e67b50d 100644 (file)
@@ -27,7 +27,7 @@ export default function directive($timeout) {
          * @param {JQLite} element
          */
         link(scope, element) {
-            $timeout(() => element[0].focus());
+            $timeout(() => element[0].focus(), 100);
         }
     };
 }