merge: fix: #505 and #516 inconsistent event propagation causes issues in notes and emoji picker when clicking on emojis (!511)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/511

Closes #505 and #516

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <marie@kaifa.ch>
This commit is contained in:
dakkar 2024-05-09 07:59:23 +00:00
commit 37989ec0e9
2 changed files with 4 additions and 2 deletions

View file

@ -85,6 +85,7 @@ const errored = ref(url.value == null);
function onClick(ev: MouseEvent) {
if (props.menu) {
ev.stopPropagation();
os.popupMenu([{
type: 'label',
text: `:${props.name}:`,

View file

@ -4,8 +4,8 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<img v-if="!useOsNativeEmojis" :class="$style.root" :src="url" :alt="props.emoji" decoding="async" @pointerenter="computeTitle" @click="onClick" v-on:click.stop/>
<span v-else :alt="props.emoji" @pointerenter="computeTitle" @click="onClick" v-on:click.stop>{{ colorizedNativeEmoji }}</span>
<img v-if="!useOsNativeEmojis" :class="$style.root" :src="url" :alt="props.emoji" decoding="async" @pointerenter="computeTitle" @click="onClick"/>
<span v-else :alt="props.emoji" @pointerenter="computeTitle" @click="onClick">{{ colorizedNativeEmoji }}</span>
</template>
<script lang="ts" setup>
@ -39,6 +39,7 @@ function computeTitle(event: PointerEvent): void {
function onClick(ev: MouseEvent) {
if (props.menu) {
ev.stopPropagation();
os.popupMenu([{
type: 'label',
text: props.emoji,