Commit fcc39d55 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix_search_in_file_tree' into 'master'

Fix search in Files

https://gitlab.com/gitlab-org/gitlab-ce/issues/1873

See merge request !1511
parents 17de909a 1a86a00c
...@@ -39,6 +39,7 @@ v 8.0.4 ...@@ -39,6 +39,7 @@ v 8.0.4
- Fix anchors to comments in diffs - Fix anchors to comments in diffs
- Remove CI token from build traces - Remove CI token from build traces
- Fix "Assign All" button on Runner admin page - Fix "Assign All" button on Runner admin page
- Fix search in Files
v 8.0.3 v 8.0.3
- Fix URL shown in Slack notifications - Fix URL shown in Slack notifications
......
...@@ -16,6 +16,9 @@ class @TreeView ...@@ -16,6 +16,9 @@ class @TreeView
li = $("tr.tree-item") li = $("tr.tree-item")
liSelected = null liSelected = null
$('body').keydown (e) -> $('body').keydown (e) ->
if $("input:focus").length > 0 && (e.which == 38 || e.which == 40)
return false
if e.which is 40 if e.which is 40
if liSelected if liSelected
next = liSelected.next() next = liSelected.next()
...@@ -38,4 +41,4 @@ class @TreeView ...@@ -38,4 +41,4 @@ class @TreeView
$(liSelected).focus() $(liSelected).focus()
else if e.which is 13 else if e.which is 13
path = $('.tree-item.selected .tree-item-file-name a').attr('href') path = $('.tree-item.selected .tree-item-file-name a').attr('href')
Turbolinks.visit(path) if path then Turbolinks.visit(path)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment