v-dialog persistent Prop: Detecting Blocked User-Initiated Close Attempts
0 reputation · 19 Dec 2023, 16:20 UTC
Goal
Identify whether Vuetify's v-dialog component provides a mechanism to detect when a user attempts to close a persistent dialog via Escape key or overlay click, but the attempt is suppressed by the persistent prop.
Constraints
The persistent prop on v-dialog prevents dismissal through Escape key presses and clicks outside the dialog overlay. However, programmatic closure via v-model updates remains possible regardless of the persistent setting. Vuetify emits update:modelValue for all closure attempts, but this event cannot distinguish between user-initiated and programmatic closures when persistent is enabled.
Uncertainty
Vuetify's documented API does not expose a separate event, callback, or prop that signals a blocked user-initiated close attempt. The research indicates that update:modelValue fires for all closure triggers, but provides no metadata about whether the closure was actually processed or suppressed by the persistent prop.
Questions
- Does Vuetify v-dialog offer any documented event, callback, or prop that distinguishes between a blocked user-initiated close attempt and a successful programmatic closure when persistent is enabled?
- Is there a recommended pattern or plugin within the Vuetify ecosystem for detecting suppressed dismissal gestures on persistent dialogs?
- Which specific Vuetify major version (v2 or v3) introduced or modified the persistent prop's behavior regarding user gesture detection?