mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
focus content editor after create new Note
This commit is contained in:
@@ -4,6 +4,7 @@ import styles from './TopBar.styl'
|
||||
import activityRecord from 'browser/lib/activityRecord'
|
||||
import Repository from 'browser/lib/Repository'
|
||||
import _ from 'lodash'
|
||||
import Commander from 'browser/main/lib/Commander'
|
||||
|
||||
const OSX = window.process.platform === 'darwin'
|
||||
|
||||
@@ -61,7 +62,6 @@ class TopBar extends React.Component {
|
||||
Repository
|
||||
.find(repositoryKey)
|
||||
.then((repo) => {
|
||||
console.log(repo)
|
||||
return repo.addNote(newNote)
|
||||
})
|
||||
.then((note) => {
|
||||
@@ -79,6 +79,7 @@ class TopBar extends React.Component {
|
||||
key: `${note._repository.key}-${note.key}`
|
||||
}
|
||||
})
|
||||
Commander.fire('note-detail:focus')
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err)
|
||||
|
||||
Reference in New Issue
Block a user