From 64f00d357472e8c96726ff1c89aa6c92073aec5f Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 11 Oct 2017 16:53:51 +0800 Subject: [PATCH] Fix HeaderSearch error --- src/components/HeaderSearch/index.js | 2 +- src/layouts/BasicLayout.less | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/HeaderSearch/index.js b/src/components/HeaderSearch/index.js index f1ba25fd..06ad10b2 100644 --- a/src/components/HeaderSearch/index.js +++ b/src/components/HeaderSearch/index.js @@ -27,7 +27,7 @@ export default class HeaderSearch extends PureComponent { enterSearchMode = () => { this.setState({ searchMode: true }, () => { if (this.state.searchMode) { - this.input.refs.input.focus(); + this.input.focus(); } }); } diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less index 0e3c0dd1..67daf60a 100644 --- a/src/layouts/BasicLayout.less +++ b/src/layouts/BasicLayout.less @@ -66,8 +66,12 @@ background: rgba(0, 0, 0, .04); } } - .search:hover { - background: transparent; + .search { + padding: 0; + margin: 0 12px; + &:hover { + background: transparent; + } } .account { .avatar { -- GitLab