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

Prevent scroll on focus for iframe
This commit is contained in:
David authored and GitHub committed 2018-07-12 16:10:06 +02:00
commit 64c77febef
1 file changed
+4 -2
@@ -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 });
},
};
}