From 656858a95ad97de437ce373af54e0a431ac5e063 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Mon, 1 Jun 2015 11:42:43 +0200 Subject: [PATCH] Autofocus on search modal --- CHANGELOG.md | 1 + app/coffee/modules/search.coffee | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34c371b9..93ce7c9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features - Show the reference of entities in search results (thanks to [@artlepool](https://github.com/artlepool)) +- Autofocus on search modal ### Misc - Improve performance: remove some unnecessary calls to the api. diff --git a/app/coffee/modules/search.coffee b/app/coffee/modules/search.coffee index 7ad65c44..a3dd1006 100644 --- a/app/coffee/modules/search.coffee +++ b/app/coffee/modules/search.coffee @@ -127,7 +127,8 @@ SearchBoxDirective = (projectService, $lightboxService, $navurls, $location, $ro openLightbox = () -> project = projectService.project - $lightboxService.open($el) + $lightboxService.open($el).then () -> + $el.find("#search-text").focus() $el.on "submit", "form", submit