Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit a1a91ac

Browse files
pgbrosstraviskaufman
authored andcommitted
fix(framework-examples): Fix VueJS snackbar example (#410)
Resolves #405
1 parent 2cc3432 commit a1a91ac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

framework-examples/vue/src/v-mdc-snackbar/Snackbar.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
<script lang="babel">
1212
import { MDCSnackbarFoundation } from '@material/snackbar';
13-
14-
const { TRANS_END_EVENT_NAME } = MDCSnackbarFoundation.strings;
13+
import { getCorrectEventName } from '@material/animation';
1514
1615
export default {
1716
props: {
@@ -72,10 +71,10 @@ export default {
7271
}
7372
},
7473
registerTransitionEndHandler (handler) {
75-
vm.$refs.root.addEventListener(TRANS_END_EVENT_NAME, handler);
74+
vm.$refs.root.addEventListener(getCorrectEventName(window, 'transitionend'), handler);
7675
},
7776
deregisterTransitionEndHandler (handler) {
78-
vm.$refs.root.removeEventListener(TRANS_END_EVENT_NAME, handler);
77+
vm.$refs.root.removeEventListener(getCorrectEventName(window, 'transitionend'), handler);
7978
}
8079
});
8180
this.foundation.init();

0 commit comments

Comments
 (0)