Closed Danbardo closed 8 years ago
I use the code below to prevent this issue, this method is referred to this issue.
var dialog = document.querySelector('dialog');
/* ... */
//add a event-handler to refresh layout after close event on dialog
dialog.addEventListener('close', refreshLayout);
function refreshLayout() {
document.querySelector('body').style.overflowY = '';
document.querySelector('body').style.overflowY = 'auto';
}
I think this is a MDL issue, not a dialog issue.
This is a hard bug to reproduce, but, sometimes after closing a dialog my scroll will remain locked until I refresh the page.
Is there a way to disable the scroll lock feature?