From 7361d352bf0fa503cc9775d5ceba39a2b6775e9b Mon Sep 17 00:00:00 2001 From: Tobias Skarhed Date: Thu, 12 Jul 2018 15:38:41 +0200 Subject: [PATCH] Add comments --- public/app/core/components/scroll/page_scroll.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/core/components/scroll/page_scroll.ts b/public/app/core/components/scroll/page_scroll.ts index 0cb36eba914..b6603f06175 100644 --- a/public/app/core/components/scroll/page_scroll.ts +++ b/public/app/core/components/scroll/page_scroll.ts @@ -29,10 +29,12 @@ export function pageScrollbar() { scope.$on('$routeChangeSuccess', () => { lastPos = 0; elem[0].scrollTop = 0; + // Focus page to enable scrolling by keyboard elem[0].focus({ preventScroll: true }); }); elem[0].tabIndex = -1; + // Focus page to enable scrolling by keyboard elem[0].focus({ preventScroll: true }); }, };