From 25c8fb087473ddd8f0e7caadd7c21dd7dd6458d5 Mon Sep 17 00:00:00 2001
From: Manoj Vivek
Date: Thu, 21 May 2020 19:55:43 +0530
Subject: [PATCH] Address bar UX improvements
---
desktop-app/app/actions/browser.js | 5 ++++-
desktop-app/app/components/Addressinput/index.js | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/desktop-app/app/actions/browser.js b/desktop-app/app/actions/browser.js
index aa667bf2d..6c0b07e8e 100644
--- a/desktop-app/app/actions/browser.js
+++ b/desktop-app/app/actions/browser.js
@@ -101,13 +101,16 @@ export function newFilters(filters) {
};
}
-export function onAddressChange(newURL) {
+export function onAddressChange(newURL, force) {
return (dispatch: Dispatch, getState: RootStateType) => {
const {
browser: {address},
} = getState();
if (newURL === address) {
+ if (force) {
+ pubsub.publish(NAVIGATION_RELOAD);
+ }
return;
}
diff --git a/desktop-app/app/components/Addressinput/index.js b/desktop-app/app/components/Addressinput/index.js
index 487a8d329..8659026cf 100644
--- a/desktop-app/app/components/Addressinput/index.js
+++ b/desktop-app/app/components/Addressinput/index.js
@@ -91,7 +91,7 @@ class AddressBar extends React.Component {
return;
}
this.props.onChange &&
- this.props.onChange(this._normalize(this.state.userTypedAddress));
+ this.props.onChange(this._normalize(this.state.userTypedAddress), true);
};
_normalize = address => {