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

Commit

Permalink
Official breaking changes from material-web-components (#218)
Browse files Browse the repository at this point in the history
* Official breaking changes from material-web-components

material-components/material-components-web#504
material-components/material-components-web@5b5ea95

* Fix transition events in dialog
  • Loading branch information
xxRockOnxx authored and posva committed Jul 11, 2017
1 parent 6ed0752 commit ee1e9cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Dialog/Dialog.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<aside :id="id"
style="visibility:hidden"
class="mdc-dialog"
role="alertdialog"
:aria-labelledby="labelId"
Expand Down Expand Up @@ -68,7 +67,6 @@ export default {
this.foundation = new MDCDialogFoundation({
addClass: (className) => this.$el.classList.add(className),
removeClass: (className) => this.$el.classList.remove(className),
setStyle: (prop, val) => this.$el.style.setProperty(prop, val),
addBodyClass: (className) => document.body.classList.add(className),
removeBodyClass: (className) => document.body.classList.remove(className),
eventTargetHasClass: (target, className) => target.classList.contains(className),
Expand All @@ -78,8 +76,11 @@ export default {
deregisterSurfaceInteractionHandler: (evt, handler) => this.$refs.surface.removeEventListener(evt, handler),
registerDocumentKeydownHandler: (handler) => document.addEventListener('keydown', handler),
deregisterDocumentKeydownHandler: (handler) => document.removeEventListener('keydown', handler),
registerTransitionEndHandler: (handler) => this.$refs.surface.addEventListener('transitionend', handler),
deregisterTransitionEndHandler: (handler) => this.$refs.surface.removeEventListener('transitionend', handler),
notifyAccept: () => this.$emit('accepted'),
notifyCancel: () => this.$emit('canceled'),
isDialog: (el) => el === this.$refs.surface,
trapFocusOnSurface: () => this.focusTrap_.activate(),
untrapFocusOnSurface: () => this.focusTrap_.deactivate(),
})
Expand Down

0 comments on commit ee1e9cb

Please sign in to comment.