Make back navigation work with history, to preserve scroll position
This commit is contained in:
parent
b2d0c4922a
commit
2ceb7cf706
|
|
@ -72,7 +72,10 @@
|
||||||
class="button button--primary"
|
class="button button--primary"
|
||||||
@click="save(contentBlock)"
|
@click="save(contentBlock)"
|
||||||
>Speichern</a>
|
>Speichern</a>
|
||||||
<a class="button">Abbrechen</a>
|
<a
|
||||||
|
class="button"
|
||||||
|
@click="goToModule"
|
||||||
|
>Abbrechen</a>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -89,6 +92,7 @@
|
||||||
import NEW_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/addContentBlock.gql';
|
import NEW_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/addContentBlock.gql';
|
||||||
import {setUserBlockType} from '@/helpers/content-block';
|
import {setUserBlockType} from '@/helpers/content-block';
|
||||||
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
|
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
|
||||||
|
import {MODULE_PAGE} from '@/router/module.names';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -235,7 +239,10 @@
|
||||||
slug
|
slug
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
}).then(this.goToModule);
|
||||||
|
},
|
||||||
|
goToModule() {
|
||||||
|
this.$router.go(-1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue