diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-17 16:55:34 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-17 16:55:34 +0100 |
commit | f91df171c53f230937b538ffdec04d12f7726ffc (patch) | |
tree | 9e2bd7ed479f45c9ba9dcd0733803affd181d73d /app/assets/javascripts/project_find_file.js | |
parent | 77507df6030dad9e317e092c70003d4c85d8f889 (diff) | |
download | gitlab-ce-f91df171c53f230937b538ffdec04d12f7726ffc.tar.gz |
Fixed find file keyboard navigationfind-file-enter-fix
Closes #23423
Diffstat (limited to 'app/assets/javascripts/project_find_file.js')
-rw-r--r-- | app/assets/javascripts/project_find_file.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/project_find_file.js b/app/assets/javascripts/project_find_file.js index 8e38ccf7e44..b8347367717 100644 --- a/app/assets/javascripts/project_find_file.js +++ b/app/assets/javascripts/project_find_file.js @@ -7,6 +7,7 @@ function ProjectFindFile(element1, options) { this.element = element1; this.options = options; + this.goToBlob = bind(this.goToBlob, this); this.goToTree = bind(this.goToTree, this); this.selectRowDown = bind(this.selectRowDown, this); this.selectRowUp = bind(this.selectRowUp, this); @@ -154,6 +155,14 @@ return location.href = this.options.treeUrl; }; + ProjectFindFile.prototype.goToBlob = function() { + var $link = this.element.find(".tree-item.selected .tree-item-file-name a"); + + if ($link.length) { + $link.get(0).click(); + } + }; + return ProjectFindFile; })(); |