Commit 8dd8e200 authored by Connor Bär's avatar Connor Bär Committed by Tim Neutkens

A11y: Set focus back to body after link was clicked (#3545)

parent e4512189
......@@ -75,7 +75,10 @@ export default class Link extends Component {
Router[changeMethod](href, as, { shallow })
.then((success) => {
if (!success) return
if (scroll) window.scrollTo(0, 0)
if (scroll) {
window.scrollTo(0, 0)
document.body.focus()
}
})
.catch((err) => {
if (this.props.onError) this.props.onError(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment