Vuetify: [Bug Report] Dialog won't behave as modal when hide-overlay prop is true

Created on 23 Aug 2019  Â·  13Comments  Â·  Source: vuetifyjs/vuetify

Environment

Vuetify Version: 2.0.10
Vue Version: 2.6.10
Browsers: Chrome 76.0.3809.100
OS: Windows 10

Steps to reproduce

Set both the persistent and hide-overlay props to true on a Dialog

Expected Behavior

The Dialog will persist even when the user clicks outside of it.

Actual Behavior

The Dialog gets dismissed when the user clicks outside of it.

Reproduction Link

https://codepen.io/wallslide/pen/BaBpZbR

VDialog bug regression

Most helpful comment

I think the problem is in the following bit :
https://github.com/vuetifyjs/vuetify/blob/51a0336e23c6e07d5bced84caa4b0c686f28a672/packages/vuetify/src/components/VDialog/VDialog.ts#L169-L179

It probably broke on v2.0.8 (https://github.com/vuetifyjs/vuetify/commit/652ba11) when this.overlay was added as a requirement for this function.

All 13 comments

Related: #8640

I think the problem is in the following bit :
https://github.com/vuetifyjs/vuetify/blob/51a0336e23c6e07d5bced84caa4b0c686f28a672/packages/vuetify/src/components/VDialog/VDialog.ts#L169-L179

It probably broke on v2.0.8 (https://github.com/vuetifyjs/vuetify/commit/652ba11) when this.overlay was added as a requirement for this function.

I reproduce the same issue with Persistent and Fullscreen.

Reproduction Link
Work: (Just click on pin)
https://codepen.io/lujienz/pen/KKPozgw
Does not work : (Just click on pin)
https://codepen.io/lujienz/pen/VwZXaKx

I have this problem. The overlay stays even tho I close the dialog.

Here's a workaround for people wanting to use bottom sheet with persist and hide-overlay in the meantime.. We extend VBottomSheet with a new control that operates correctly. The export as any makes it work with vue-property-decorator.

import { VBottomSheet } from "vuetify/lib";

export default {
    extends: VBottomSheet,

    methods: {
        closeConditional(_e: Event) {
            return false;
        }
    }
} as any;

Thanks @ErikMikkelson this made the trick!

Also, it might be useful to override the hideScroll() method to let the user scroll in the interface.

Still not working, version 2.1.12.

<v-bottom-sheet v-model="sheet"
                  scrollable
                  hide-overlay
                  persistent>
    <v-card>...</vcard>
</v-bottom-sheet>

When I click outside the dialog, then the dialog is clothing.

Any thoughts?

EDIT:
My bad, I placed v-bottom-sheet in the wrong place.

This issue have been fixed, please create a new one for bottom sheet problem

I have created an issue (#9242) for some time for this problem, should I reopen it or create a new one?

Thanks, seems to work in codepen, will try it in our application.

On Mon, Dec 2, 2019 at 7:16 PM Jacek Karczmarczyk notifications@github.com
wrote:

9242 https://github.com/vuetifyjs/vuetify/issues/9242 is fixed:

https://codepen.io/jkarczm/pen/WNbNXNq

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/vuetifyjs/vuetify/issues/8697?email_source=notifications&email_token=AAVU5IL72RMHN7YC3ITZKMDQWU7GRA5CNFSM4IO3B2BKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFUGYIQ#issuecomment-560491554,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVU5IOFSX2GGDJNSVAUCCLQWU7GRANCNFSM4IO3B2BA
.

--
Alexandru RADOVICI
Universitatea "Politehnica" din Bucuresti

e-mail: [email protected]
telefon: 0742061223
www.ipworkshop.ro

when both persistent and hide-overlay are set, the page can be scrolled, which i believe is not the intended case

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smousa picture smousa  Â·  3Comments

aaronjpitts picture aaronjpitts  Â·  3Comments

efootstep picture efootstep  Â·  3Comments

cawa-93 picture cawa-93  Â·  3Comments

SteffenDE picture SteffenDE  Â·  3Comments