From 24def018f57c90817e4d0f32b4aba95e9b9093ac Mon Sep 17 00:00:00 2001 From: Bruno Alves de Faria Date: Mon, 15 Aug 2016 15:12:32 -0300 Subject: [PATCH] LT-275: Auto-focusing the search input --- .../client/components/bootstrap/input/selectTree.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Packages/ohif-core/client/components/bootstrap/input/selectTree.js b/Packages/ohif-core/client/components/bootstrap/input/selectTree.js index c2cd715b5..f011b2ec8 100644 --- a/Packages/ohif-core/client/components/bootstrap/input/selectTree.js +++ b/Packages/ohif-core/client/components/bootstrap/input/selectTree.js @@ -45,8 +45,13 @@ Template.selectTree.onRendered(() => { })).trigger('spatialChanged'); } - // Start the component transitions - Meteor.defer(() => $treeRoot.addClass('started')); + Meteor.defer(() => { + // Start the component transitions + $treeRoot.addClass('started'); + + // Focus the search box + $treeRoot.find('.tree-search input').focus(); + }); // Update the component's viewport height instance.updateHeight = searchTerm => {