From 7f8f2a42c774f548f3d8cf24afe8eefe708de13f Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 3 Feb 2021 22:10:38 +0300 Subject: [PATCH] refactor(v2): remove delay after skip link pressed --- .../docusaurus-theme-classic/src/theme/SkipToContent/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx b/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx index 32883e1b37e1..bf31c13377f9 100644 --- a/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx @@ -13,7 +13,7 @@ import styles from './styles.module.css'; function programmaticFocus(el) { el.setAttribute('tabindex', '-1'); el.focus(); - setTimeout(() => el.removeAttribute('tabindex'), 1000); + el.removeAttribute('tabindex'); } function SkipToContent(): JSX.Element {