1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

focus first input & fix deprecated code

This commit is contained in:
Rokt33r
2016-05-03 23:18:39 +09:00
parent 1e7cce9056
commit 27c22a4b09

View File

@@ -10,7 +10,7 @@ const remote = electron.remote
function browseFolder () {
let dialog = remote.dialog
let defaultPath = remote.app.getHomeDir()
let defaultPath = remote.app.getPath('home')
return new Promise((resolve, reject) => {
dialog.showOpenDialog({
title: 'Select Directory',
@@ -36,6 +36,10 @@ class NewRepositoryModal extends React.Component {
}
}
componentDidMount () {
this.refs.nameInput.focus()
}
handleCloseButtonClick (e) {
this.props.close()
}