Skip to content
This repository was archived by the owner on Jun 10, 2023. It is now read-only.

Commit ee1e9cb

Browse files
xxRockOnxxposva
authored andcommitted
Official breaking changes from material-web-components (#218)
* Official breaking changes from material-web-components material-components/material-components-web#504 material-components/material-components-web@5b5ea95 * Fix transition events in dialog
1 parent 6ed0752 commit ee1e9cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Dialog/Dialog.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<aside :id="id"
3-
style="visibility:hidden"
43
class="mdc-dialog"
54
role="alertdialog"
65
:aria-labelledby="labelId"
@@ -68,7 +67,6 @@ export default {
6867
this.foundation = new MDCDialogFoundation({
6968
addClass: (className) => this.$el.classList.add(className),
7069
removeClass: (className) => this.$el.classList.remove(className),
71-
setStyle: (prop, val) => this.$el.style.setProperty(prop, val),
7270
addBodyClass: (className) => document.body.classList.add(className),
7371
removeBodyClass: (className) => document.body.classList.remove(className),
7472
eventTargetHasClass: (target, className) => target.classList.contains(className),
@@ -78,8 +76,11 @@ export default {
7876
deregisterSurfaceInteractionHandler: (evt, handler) => this.$refs.surface.removeEventListener(evt, handler),
7977
registerDocumentKeydownHandler: (handler) => document.addEventListener('keydown', handler),
8078
deregisterDocumentKeydownHandler: (handler) => document.removeEventListener('keydown', handler),
79+
registerTransitionEndHandler: (handler) => this.$refs.surface.addEventListener('transitionend', handler),
80+
deregisterTransitionEndHandler: (handler) => this.$refs.surface.removeEventListener('transitionend', handler),
8181
notifyAccept: () => this.$emit('accepted'),
8282
notifyCancel: () => this.$emit('canceled'),
83+
isDialog: (el) => el === this.$refs.surface,
8384
trapFocusOnSurface: () => this.focusTrap_.activate(),
8485
untrapFocusOnSurface: () => this.focusTrap_.deactivate(),
8586
})

0 commit comments

Comments
 (0)