Workaround to support keyboard navigation in tree

This commit is contained in:
Buu Nguyen 2015-03-06 13:03:56 -08:00
parent 165ffd2186
commit 2980220b96
1 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,11 @@ function TreeView($dom, store, adapter) {
? $target.children(':first')
: $target.siblings(':first') // handles child links in submodule
// refocus after complete so that keyboard navigation works, fix #158
$(document).one('pjax:success', function () {
$.jstree.reference(this).get_container().focus()
}.bind(this))
if ($icon.hasClass('commit')) adapter.selectSubmodule(href)
else if ($icon.hasClass('blob')) adapter.selectPath(href, store.get(STORE.TABSIZE))
})
@ -109,4 +114,4 @@ TreeView.prototype.syncSelection = function() {
tree.select_node(nodeId)
tree.open_node(nodeId)
}
}
}