diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-16 11:05:14 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-20 11:55:59 +0100 |
commit | 77c8600a39fb357198459b1dc47e23a994ed4211 (patch) | |
tree | 028cd0bddc96b817217a728c82f77008ae8ef230 /app/assets | |
parent | 44b8b77e02423ce97f9abe80e0335f4f4c453c83 (diff) | |
download | gitlab-ce-77c8600a39fb357198459b1dc47e23a994ed4211.tar.gz |
Fixed search field blur not removing focus
Closes #18670
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/search_autocomplete.js.coffee | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/assets/javascripts/search_autocomplete.js.coffee b/app/assets/javascripts/search_autocomplete.js.coffee index 421328554b8..3c33d87b696 100644 --- a/app/assets/javascripts/search_autocomplete.js.coffee +++ b/app/assets/javascripts/search_autocomplete.js.coffee @@ -171,22 +171,15 @@ class @SearchAutocomplete } bindEvents: -> - $(document).on 'click', @onDocumentClick @searchInput.on 'keydown', @onSearchInputKeyDown @searchInput.on 'keyup', @onSearchInputKeyUp @searchInput.on 'click', @onSearchInputClick @searchInput.on 'focus', @onSearchInputFocus + @searchInput.on 'blur', @onSearchInputBlur @clearInput.on 'click', @onClearInputClick @locationBadgeEl.on 'click', => @searchInput.focus() - onDocumentClick: (e) => - # If clicking outside the search box - # And search input is not focused - # And we are not clicking inside a suggestion - if not $.contains(@dropdown[0], e.target) and @isFocused and not $(e.target).closest('.search-form').length - @onSearchInputBlur() - enableAutocomplete: -> # No need to enable anything if user is not logged in return if !gon.current_user_id |