diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index 33a0adf08..641186c27 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -259,13 +259,22 @@ class NoteList extends React.Component { } jumpNoteByHashHandler (event, noteHash) { + const { data } = this.props + // first argument event isn't used. if (this.notes === null || this.notes.length === 0) { return } const selectedNoteKeys = [noteHash] - this.focusNote(selectedNoteKeys, noteHash, '/home') + + let locationToSelect = '/home' + const noteByHash = data.noteMap.map((note) => note).find(note => note.key === noteHash) + if (noteByHash !== undefined) { + locationToSelect = '/storages/' + noteByHash.storage + '/folders/' + noteByHash.folder + } + + this.focusNote(selectedNoteKeys, noteHash, locationToSelect) ee.emit('list:moved') }