Add leading '<' + trim space when copying messages

Fixes: #4369
This commit is contained in:
Reto Brunner 2022-02-15 09:15:34 +01:00
commit e2e050d3c3
2 changed files with 8 additions and 8 deletions

View File

@ -17,9 +17,8 @@
aria-hidden="true" aria-hidden="true"
:aria-label="messageTimeLocale" :aria-label="messageTimeLocale"
class="time tooltipped tooltipped-e" class="time tooltipped tooltipped-e"
>{{ messageTime }}</span
> >
{{ messageTime }}
</span>
<template v-if="message.type === 'unhandled'"> <template v-if="message.type === 'unhandled'">
<span class="from">[{{ message.command }}]</span> <span class="from">[{{ message.command }}]</span>
<span class="content"> <span class="content">
@ -27,11 +26,11 @@
</span> </span>
</template> </template>
<template v-else-if="isAction()"> <template v-else-if="isAction()">
<span class="from"><span class="only-copy">*** </span></span> <span class="from"><span class="only-copy">***&nbsp;</span></span>
<component :is="messageComponent" :network="network" :message="message" /> <component :is="messageComponent" :network="network" :message="message" />
</template> </template>
<template v-else-if="message.type === 'action'"> <template v-else-if="message.type === 'action'">
<span class="from"><span class="only-copy">* </span></span> <span class="from"><span class="only-copy">*&nbsp;</span></span>
<span class="content" dir="auto"> <span class="content" dir="auto">
<Username <Username
:user="message.from" :user="message.from"
@ -53,21 +52,21 @@
<template v-if="message.from && message.from.nick"> <template v-if="message.from && message.from.nick">
<span class="only-copy" aria-hidden="true">&lt;</span> <span class="only-copy" aria-hidden="true">&lt;</span>
<Username :user="message.from" :network="network" :channel="channel" /> <Username :user="message.from" :network="network" :channel="channel" />
<span class="only-copy" aria-hidden="true">&gt; </span> <span class="only-copy" aria-hidden="true">&gt;&nbsp;</span>
</template> </template>
</span> </span>
<span v-else-if="message.type === 'plugin'" class="from"> <span v-else-if="message.type === 'plugin'" class="from">
<template v-if="message.from && message.from.nick"> <template v-if="message.from && message.from.nick">
<span class="only-copy" aria-hidden="true">[</span> <span class="only-copy" aria-hidden="true">[</span>
{{ message.from.nick }} {{ message.from.nick }}
<span class="only-copy" aria-hidden="true">] </span> <span class="only-copy" aria-hidden="true">]&nbsp;</span>
</template> </template>
</span> </span>
<span v-else class="from"> <span v-else class="from">
<template v-if="message.from && message.from.nick"> <template v-if="message.from && message.from.nick">
<span class="only-copy" aria-hidden="true">-</span> <span class="only-copy" aria-hidden="true">-</span>
<Username :user="message.from" :network="network" :channel="channel" /> <Username :user="message.from" :network="network" :channel="channel" />
<span class="only-copy" aria-hidden="true">- </span> <span class="only-copy" aria-hidden="true">-&nbsp;</span>
</template> </template>
</span> </span>
<span class="content" dir="auto"> <span class="content" dir="auto">

View File

@ -280,7 +280,8 @@ p {
.only-copy { .only-copy {
font-size: 0; font-size: 0;
opacity: 0; opacity: 0;
width: 0; width: 0.01px; /* Must be non-zero to be the first selected character on Firefox */
display: inline-block;
} }
/* Icons */ /* Icons */