diff --git a/lib/components/user/wizard.tsx b/lib/components/user/wizard.tsx index d2f767a45..e41805d75 100644 --- a/lib/components/user/wizard.tsx +++ b/lib/components/user/wizard.tsx @@ -91,7 +91,6 @@ class Wizard extends Component { } this._routeTo(nextId) } - this._focusHeader() } else { // Display a toast to acknowledge saved changes // (although in reality, changes quietly took effect in previous screens). @@ -106,7 +105,6 @@ class Wizard extends Component { const prevId = pages[activePaneIndex - 1] prevId && this._routeTo(prevId) } - this._focusHeader() } componentDidMount(): void { @@ -117,6 +115,12 @@ class Wizard extends Component { } } + componentDidUpdate(prevProps: Readonly): void { + if (prevProps.activePane !== this.props.activePane) { + this._focusHeader() + } + } + render() { const { activePane, activePaneIndex, formikProps, pages, title } = this.props