fix(v2): fix SkipToContent programmatic focus when updating querystring (#5104)

This commit is contained in:
Sébastien Lorber 2021-06-30 19:37:40 +02:00 committed by GitHub
parent 15a2b59f9f
commit d65cc9d23f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@ function SkipToContent(): JSX.Element {
};
useLocationChange(({location}) => {
if (containerRef.current && !location.hash && action !== 'POP') {
if (containerRef.current && !location.hash && action === 'PUSH') {
programmaticFocus(containerRef.current);
}
});