From 24c6751d7618bd695ca24485b10e7e4d050b5c7b Mon Sep 17 00:00:00 2001 From: Mahadevan Sreenivasan Date: Wed, 15 Apr 2020 15:49:49 +0530 Subject: fix: Home button doesn't navigate to Service URL (#573) * fix: Home button in service navigation bar doesn't navigate to Service Home - Currently this doesnt happen because the reload method in ServiceStore simply reloads the chromium webview. - Change .reload() to .goToIndex(0) where 0 is the absolute index in navigation history - Documentation can be found here - https://www.electronjs.org/docs/api/webview-tag#webviewgotoindexindex * fix: Home button navigation - Navigate to webiew.goToIndex(0) in WebControlsScreen instead of modifying ServicesStore based on @vantezzen's comments --- src/features/webControls/containers/WebControlsScreen.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/features/webControls/containers') diff --git a/src/features/webControls/containers/WebControlsScreen.js b/src/features/webControls/containers/WebControlsScreen.js index 31168a397..258b15b14 100644 --- a/src/features/webControls/containers/WebControlsScreen.js +++ b/src/features/webControls/containers/WebControlsScreen.js @@ -52,11 +52,8 @@ class WebControlsScreen extends Component { } goHome() { - const { reloadActive } = this.props.actions.service; - if (!this.webview) return; - - reloadActive(); + this.webview.goToIndex(0); } reload() { -- cgit v1.2.3-70-g09d2