Fix Modal Stack - reopening modals (#10493)

* use fallback target.id - only scroll modal content (not the page)

* fix lint

* debug information

* add snackbar onClick callback - use notification instead of modal for joined-challenge

* revert console.log / fix lint
This commit is contained in:
negue
2018-07-20 22:50:40 +02:00
committed by Sabe Jones
parent b7a46637d5
commit 7b562c45cf
5 changed files with 35 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
<template lang="pug">
transition(name="fade")
.notification.callout.animated(:class="classes", v-if='show', @click='show = false')
.notification.callout.animated(:class="classes", v-if='show', @click='handleOnClick()')
.row(v-if='notification.type === "error"')
.text.col-12
div(v-html='notification.text')
@@ -146,6 +146,15 @@ export default {
beforeDestroy () {
clearTimeout(this.timer);
},
methods: {
handleOnClick () {
if (typeof this.notification.onClick === 'function') {
this.notification.onClick();
}
this.show = false;
},
},
watch: {
show () {
this.$store.dispatch('snackbars:remove', this.notification);