From 09f81fd0d6b7b1050887b001ae333e7500a617f3 Mon Sep 17 00:00:00 2001 From: Rokt33r Date: Sun, 13 Dec 2015 19:44:40 +0900 Subject: [PATCH] =?UTF-8?q?Finder=E3=82=92=E9=96=8B=E3=81=8D=E7=9B=B4?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=82=89=E5=86=85=E5=AE=B9=E5=88=9D=E6=9C=9F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browser/finder/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/browser/finder/index.js b/browser/finder/index.js index fa1f2ed2..36360693 100644 --- a/browser/finder/index.js +++ b/browser/finder/index.js @@ -35,10 +35,17 @@ class FinderMain extends React.Component { this.keyDownHandler = e => this.handleKeyDown(e) document.addEventListener('keydown', this.keyDownHandler) ReactDOM.findDOMNode(this.refs.finderInput.refs.input).focus() + this.focusHandler = e => { + let { dispatch } = this.props + + dispatch(searchArticle('')) + } + window.addEventListener('focus', this.focusHandler) } componentWillUnmount () { document.removeEventListener('keydown', this.keyDownHandler) + window.removeEventListener('focus', this.focusHandler) } handleKeyDown (e) {