If a modal redirects to a new page, its 'unmount' function is not called and so window scroll is not restored.
@@ -133,6 +133,7 @@ class EndpointDetailsPage extends React.Component {
}
handleDeleteEndpointConfirmation() {
+ this.setState({ showDeleteEndpointConfirmation: false })
window.location.href = '/#/endpoints'
EndpointActions.delete(this.getEndpoint())
@@ -102,6 +102,7 @@ class MigrationDetailsPage extends React.Component {
handleDeleteMigrationConfirmation() {
+ this.setState({ showDeleteMigrationConfirmation: false })
window.location.href = '/#/migrations'
MigrationActions.delete(this.props.migrationStore.migrationDetails.id)
@@ -152,6 +152,7 @@ class ReplicaDetailsPage extends React.Component {
handleDeleteReplicaConfirmation() {
+ this.setState({ showDeleteReplicaConfirmation: false })
window.location.href = '/#/replicas'
ReplicaActions.delete(this.props.replicaStore.replicaDetails.id)