Skip to content
Snippets Groups Projects
Unverified Commit 072b8555 authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix full screen modal when page is scrolled. Resolves #4068

parent 65b52fae
No related branches found
No related tags found
No related merge requests found
......@@ -116,13 +116,13 @@ export class FullPageModal extends Component {
this._modalElement.className = "Modal--full";
document.querySelector('body').appendChild(this._modalElement);
this.componentDidUpdate();
// save the scroll position, scroll to the top left, and disable scrolling
this._scrollX = window.scrollX;
this._scrollY = window.scrollY;
window.scrollTo(0,0);
document.body.style.overflow = "hidden";
this.componentDidUpdate();
}
componentDidUpdate() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment