Vuetify: Dialog scroll position does not reset on subsequent shows

Created on 11 Sep 2017  路  4Comments  路  Source: vuetifyjs/vuetify

Steps to reproduce

You can take Dialog Example 7 (Overflow), scroll it, close it and then show it again.

Versions

0.15.3 using latest Chrome/Opera/Edge

What is expected ?

The scroll position for the dialog should reset to zero.

What is actually happening ?

It could be that the dialog state is being cached, which i totally understand. But i was expecting the scroll position to be reset.

Reproduction Link


https://vuetifyjs.com/components/dialogs - Just try the codepen on example 7 and you'll see.

Most helpful comment

Yeah, that's working with document.getElementsByClassName('dialog dialog--active')[0].scrollTop = 0

All 4 comments

Unfortunately this is default behavior. If you wish to change it, you can manually change the scrollTop of the overflowed element programmatically.

Yeah, that's working with document.getElementsByClassName('dialog dialog--active')[0].scrollTop = 0

Please add to docs that now is possible to set the container in option atributte.

Like this:

goTo ( '#divId', { container: '#scroll-target' })

document.getElementsByClassName('v-dialog--active')[0].scrollTop = 0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricardovanlaarhoven picture ricardovanlaarhoven  路  3Comments

cawa-93 picture cawa-93  路  3Comments

aaronjpitts picture aaronjpitts  路  3Comments

dschreij picture dschreij  路  3Comments

Antway picture Antway  路  3Comments