From a20f5b0ab6f442dda89d1bf1576a74b0feab79cb Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Fri, 25 Aug 2017 17:16:18 +0200 Subject: [PATCH] Disable auto focus when creating a new viz, fix #12888 --- .../kibana/public/visualize/wizard/step_2.html | 1 + src/ui/public/directives/saved_object_finder.js | 7 ++++++- src/ui/public/partials/saved_object_finder.html | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core_plugins/kibana/public/visualize/wizard/step_2.html b/src/core_plugins/kibana/public/visualize/wizard/step_2.html index 492e5d66e0174..cb1d9c0bdf92d 100644 --- a/src/core_plugins/kibana/public/visualize/wizard/step_2.html +++ b/src/core_plugins/kibana/public/visualize/wizard/step_2.html @@ -38,6 +38,7 @@

type="searches" class="wizard-row visualizeWizardSavedObjectFinder kuiVerticalRhythm" make-url="step2WithSearchUrl" + disable-auto-focus="false" > diff --git a/src/ui/public/directives/saved_object_finder.js b/src/ui/public/directives/saved_object_finder.js index 74861250ca943..66d51749ee0e2 100644 --- a/src/ui/public/directives/saved_object_finder.js +++ b/src/ui/public/directives/saved_object_finder.js @@ -25,7 +25,12 @@ module.directive('savedObjectFinder', function ($location, $injector, kbnUrl, Pr * @type {function} - an optional function. If supplied an `Add new X` button is shown * and this function is called when clicked. */ - onAddNew: '=' + onAddNew: '=', + /** + * @{type} boolean - set this to true, if you don't want the search box above the + * table to automatically gain focus once loaded + */ + disableAutoFocus: '=' }, template: savedObjectFinderTemplate, controllerAs: 'finder', diff --git a/src/ui/public/partials/saved_object_finder.html b/src/ui/public/partials/saved_object_finder.html index daf6bd8991c49..5e4483d912581 100644 --- a/src/ui/public/partials/saved_object_finder.html +++ b/src/ui/public/partials/saved_object_finder.html @@ -9,6 +9,7 @@