Workaround to support keyboard navigation in tree
This commit is contained in:
parent
165ffd2186
commit
2980220b96
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue