RootView passes focus to a child element with a tabindex of -1 (if one exists)

This commit is contained in:
Corey Johnson
2012-09-25 13:22:06 -07:00
parent aa7325b355
commit d13796074b
3 changed files with 23 additions and 6 deletions

View File

@@ -62,6 +62,11 @@ class RootView extends View
false
else
@setTitle(@project?.getPath())
if focusableChild = this.find("[tabindex=-1]")
focusableChild.focus()
false
else
true
@on 'active-editor-path-change', (e, path) =>
@project.setPath(path) unless @project.getRootDirectory()