diff --git a/src/modules/Search/Search.js b/src/modules/Search/Search.js
index 9319c4864f..ee1a18e869 100644
--- a/src/modules/Search/Search.js
+++ b/src/modules/Search/Search.js
@@ -539,10 +539,8 @@ export default class Search extends Component {
...rest,
icon,
input: { className: 'prompt', tabIndex: '0', autoComplete: 'off' },
- onBlur: this.handleBlur,
onChange: this.handleSearchChange,
onClick: this.handleInputClick,
- onFocus: this.handleFocus,
value,
} })
}
diff --git a/test/specs/modules/Search/Search-test.js b/test/specs/modules/Search/Search-test.js
index 2f8cdf4806..77af1616ec 100644
--- a/test/specs/modules/Search/Search-test.js
+++ b/test/specs/modules/Search/Search-test.js
@@ -525,6 +525,28 @@ describe('Search', () => {
})
})
+ describe('onBlur', () => {
+ it('is called with (event, data) on search input blur', () => {
+ const onBlur = sandbox.spy()
+ wrapperMount()
+ .simulate('blur', nativeEvent)
+
+ onBlur.should.have.been.calledOnce()
+ onBlur.should.have.been.calledWithMatch(nativeEvent, { onBlur, results: options })
+ })
+ })
+
+ describe('onFocus', () => {
+ it('is called with (event, data) on search input focus', () => {
+ const onFocus = sandbox.spy()
+ wrapperMount()
+ .simulate('focus', nativeEvent)
+
+ onFocus.should.have.been.calledOnce()
+ onFocus.should.have.been.calledWithMatch(nativeEvent, { onFocus, results: options })
+ })
+ })
+
describe('onResultSelect', () => {
let spy
beforeEach(() => {