Do not call the single post timeline when clicking on a link, a post's attachment,

or a post's author name.

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
pull/730/head
Cyrille Bollu 2019-09-14 16:18:57 +02:00 zatwierdzone przez Maxence Lange
rodzic a4de752d9c
commit 9b51fc5834
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -94,7 +94,13 @@ export default {
}
},
methods: {
getSinglePostTimeline() {
getSinglePostTimeline(e) {
// Do not call the single-post view when clicking on a link, a post attachment miniature or the post's author
if (e.target.tagName === 'A' || e.target.tagName === 'IMG' || e.target.className.startsWith('post-author')) {
return
}
this.$router.push({ name: 'single-post',
params: {
id: this.item.id,