Initialize autocomplete only when search form is present
This commit is contained in:
parent
4c268027d2
commit
b169046e57
1 changed files with 3 additions and 2 deletions
|
@ -146,10 +146,11 @@ class Dispatcher
|
|||
when 'project_members', 'deploy_keys', 'hooks', 'services', 'protected_branches'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
|
||||
|
||||
# If we haven't installed a custom shortcut handler, install the default one
|
||||
if not shortcut_handler
|
||||
new Shortcuts()
|
||||
|
||||
initSearch: ->
|
||||
new SearchAutocomplete()
|
||||
|
||||
# Only when search form is present
|
||||
new SearchAutocomplete() if $('.search').length
|
||||
|
|
Loading…
Reference in a new issue