Merge pull request #12586 from dehrax/12075-iframe-scroll

Prevent scroll on focus for iframe
pull/12590/head
David 7 years ago committed by GitHub
commit 64c77febef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      public/app/core/components/scroll/page_scroll.ts

@ -29,11 +29,13 @@ export function pageScrollbar() {
scope.$on('$routeChangeSuccess', () => {
lastPos = 0;
elem[0].scrollTop = 0;
elem[0].focus();
// Focus page to enable scrolling by keyboard
elem[0].focus({ preventScroll: true });
});
elem[0].tabIndex = -1;
elem[0].focus();
// Focus page to enable scrolling by keyboard
elem[0].focus({ preventScroll: true });
},
};
}

Loading…
Cancel
Save