From f4fe9294f05cbf1fe0743477658c5158c6ee3b1b Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 29 May 2019 17:45:14 +0100 Subject: [PATCH] fix backspace in search uri bar --- app/src/component/uriBar/view.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/component/uriBar/view.js b/app/src/component/uriBar/view.js index d015a233..d67c6f88 100644 --- a/app/src/component/uriBar/view.js +++ b/app/src/component/uriBar/view.js @@ -43,7 +43,6 @@ class UriBar extends React.PureComponent { currentValue: null, inputText: null, focused: false, - currentValueSet: false, // TODO: Add a setting to enable / disable direct search? directSearch: true }; @@ -139,8 +138,8 @@ class UriBar extends React.PureComponent { render() { const { navigation, suggestions, query, value } = this.props; - if (!this.state.currentValue) { - this.setState({ currentValue: value, currentValueSet: true }); + if (this.state.currentValue === null) { + this.setState({ currentValue: value }); } let style = [uriBarStyle.overlay];