Vuetify: 1.1.0-beta.0
Vue: 2.5.16
Browsers: Chrome 66.0.3359.181
OS: Windows 7
Create a fullscreen dialog with content that exceeds the viewport.
Only one scrollbar should be visible (the one in the dialog), and the underlying page scrollbar should be hidden.
Both scrollbars are visible resulting in bad UX. Also, even if the dialog content does not require scrolling, the page scrollbar is still visible which is confusing as fullscreen dialogs cover the viewport anyway.
https://codepen.io/anon/pen/YvKxzg
Suggested solution:
When opening a fullscreen dialog, set overflow: hidden on the html element.
Wouldn't be on the body element?
@jonataswalker No, the CSS reset explicitly sets overflow-y: scroll on the html element.
I have plans for our css reset for 1.2 (didn't make it to 1.1 because I was moving). This will be included in those changes/updates.
Same as #3101
Duplicate of #3101
Hi there, exist a workaround?
This is how you disable overflow on the html element when dialog opens.
watch: {
dialog: function (val) {
document.querySelector('html').style.overflow = val ? 'hidden' : null
}
}
Most helpful comment
This is how you disable overflow on the html element when dialog opens.
watch: { dialog: function (val) { document.querySelector('html').style.overflow = val ? 'hidden' : null } }