From 59f8425c974f2d78baebcf13cdebd35cc941674b Mon Sep 17 00:00:00 2001 From: alwxkxk Date: Mon, 29 Jul 2019 13:05:12 +0800 Subject: [PATCH] fix #2935 --- browser/main/NoteList/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index 17e25a44a..51c7822f7 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -88,6 +88,7 @@ class NoteList extends React.Component { this.importFromFileHandler = this.importFromFile.bind(this) this.jumpNoteByHash = this.jumpNoteByHashHandler.bind(this) this.handleNoteListKeyUp = this.handleNoteListKeyUp.bind(this) + this.handleNoteListBlur = this.handleNoteListBlur.bind(this) this.getNoteKeyFromTargetIndex = this.getNoteKeyFromTargetIndex.bind(this) this.cloneNote = this.cloneNote.bind(this) this.deleteNote = this.deleteNote.bind(this) @@ -348,6 +349,13 @@ class NoteList extends React.Component { } } + handleNoteListBlur () { + this.setState({ + shiftKeyDown: false, + ctrlKeyDown: false + }) + } + getNotes () { const { data, match: { params }, location } = this.props if (location.pathname.match(/\/home/) || location.pathname.match(/alltags/)) { @@ -1155,6 +1163,7 @@ class NoteList extends React.Component { tabIndex='-1' onKeyDown={(e) => this.handleNoteListKeyDown(e)} onKeyUp={this.handleNoteListKeyUp} + onBlur={this.handleNoteListBlur} > {noteList}