summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkSubNoteContent.vue
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-11-27 22:06:25 +0100
committerMar0xy <marie@kaifa.ch>2023-11-27 22:06:25 +0100
commit3d0b754332192533b166f8aa20ec87f1808edfe8 (patch)
tree14c122ab82b4e267d6f47792b8697d434af693fc /packages/frontend/src/components/MkSubNoteContent.vue
parentchore: fix japanese locale (diff)
downloadsharkey-3d0b754332192533b166f8aa20ec87f1808edfe8.tar.gz
sharkey-3d0b754332192533b166f8aa20ec87f1808edfe8.tar.bz2
sharkey-3d0b754332192533b166f8aa20ec87f1808edfe8.zip
fix: selecting text in a note causing it to open
Closes transfem-org/Sharkey#175
Diffstat (limited to 'packages/frontend/src/components/MkSubNoteContent.vue')
-rw-r--r--packages/frontend/src/components/MkSubNoteContent.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue
index 110644947f..8a306d172f 100644
--- a/packages/frontend/src/components/MkSubNoteContent.vue
+++ b/packages/frontend/src/components/MkSubNoteContent.vue
@@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkLoading v-if="translating" mini/>
<div v-else>
<b>{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: </b>
- <Mfm :text="translation.text" :author="note.user" :nyaize="'account'" :emojiUrls="note.emojis"/>
+ <Mfm :text="translation.text" :author="note.user" :nyaize="'respect'" :emojiUrls="note.emojis"/>
</div>
</div>
<MkA v-if="note.renoteId" :class="$style.rp" :to="`/notes/${note.renoteId}`" v-on:click.stop>RN: ...</MkA>
@@ -63,7 +63,10 @@ const props = defineProps<{
const router = useRouter();
function noteclick(id: string) {
- router.push(`/notes/${id}`);
+ const selection = document.getSelection();
+ if (selection?.toString().length === 0) {
+ router.push(`/notes/${id}`);
+ }
}
const parsed = $computed(() => props.note.text ? mfm.parse(props.note.text) : null);