1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-16 03:06:27 +00:00

Find command of ace won't fire blur

This commit is contained in:
Rokt33r
2016-01-16 00:58:49 +09:00
parent c42e1892d0
commit 445332c27c
2 changed files with 31 additions and 14 deletions

View File

@@ -85,7 +85,8 @@ export default class ArticleEditor extends React.Component {
}
}
handlePreviewMouseUp () {
handlePreviewMouseUp (e) {
if (e.button === 2) return true
this.isMouseDown = false
this.moveCount = 0
if (!this.isDrag) {
@@ -94,17 +95,8 @@ export default class ArticleEditor extends React.Component {
}
handleBlurCodeEditor (e) {
let isWindowBlurred = e.relatedTarget === null
let isFocusingToThis = e.relatedTarget === ReactDOM.findDOMNode(this)
let isFocusingToSearch = e.relatedTarget.className === 'ace_search_field'
if (isWindowBlurred || isFocusingToThis) {
e.preventDefault()
return
}
if (isFocusingToSearch) {
e.preventDefault()
if (isFocusingToThis) {
return
}