Skip to content

Commit 27c22a4

Browse files
committed
focus first input & fix deprecated code
1 parent 1e7cce9 commit 27c22a4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

browser/main/modal/NewRepositoryModal.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const remote = electron.remote
1010
function browseFolder () {
1111
let dialog = remote.dialog
1212

13-
let defaultPath = remote.app.getHomeDir()
13+
let defaultPath = remote.app.getPath('home')
1414
return new Promise((resolve, reject) => {
1515
dialog.showOpenDialog({
1616
title: 'Select Directory',
@@ -36,6 +36,10 @@ class NewRepositoryModal extends React.Component {
3636
}
3737
}
3838

39+
componentDidMount () {
40+
this.refs.nameInput.focus()
41+
}
42+
3943
handleCloseButtonClick (e) {
4044
this.props.close()
4145
}

0 commit comments

Comments
 (0)