From 003c41fdc6ba4924e17a3b229f9cde8176b2477e Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Fri, 27 Jun 2014 11:43:32 -0700 Subject: [PATCH] Added focus directive The focus directive allows us to autofocus a particular element (assuming it supports keyboard focus) when it is rendered to the DOM. The example use case is the search page, where the input text field is automatically selected. Change-Id: Ib2ec35134be5c667ea01b48433815a857d00c6d2 --- src/app/search/template/index.html | 1 + src/app/util/directive/focus.js | 37 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 src/app/util/directive/focus.js diff --git a/src/app/search/template/index.html b/src/app/search/template/index.html index dd0e49f1..d3ffbd07 100644 --- a/src/app/search/template/index.html +++ b/src/app/search/template/index.html @@ -23,6 +23,7 @@