diff --git a/components/composer/package.json b/components/composer/package.json index c9c19d8a..45dddb2f 100644 --- a/components/composer/package.json +++ b/components/composer/package.json @@ -13,5 +13,5 @@ "start": "echo 'Nothing to start'" }, "main": "index.js", - "gitHead": "cca94159c114ecff613f41caa0a4468e0f698e2c" + "gitHead": "65fe465e0fe71d5cc4601a56615d53d1d93e29e4" } diff --git a/components/email/src/Email.svelte b/components/email/src/Email.svelte index ddb9b8a0..484807cf 100644 --- a/components/email/src/Email.svelte +++ b/components/email/src/Email.svelte @@ -650,9 +650,27 @@ ); } + // When highlighting text elements (e.g. 'to', 'from', or 'date') in our + // email header, we want to prevent the thread from expanding/collapsing. + // Without this, a user cannot highlight text to copy/paste it. + let lastHighlightingDragTime = 0; + + const handleHighlightSelectionMouseDown = () => { + lastHighlightingDragTime = Date.now(); + }; + function handleEmailClick(event: MouseEvent, msgIndex: number) { event.stopImmediatePropagation(); + // Prevent thread from expanding/collapsing when highlighting text + if ( + lastHighlightingDragTime !== 0 && + Date.now() - lastHighlightingDragTime > 100 + ) { + lastHighlightingDragTime = 0; + return; + } + if (msgIndex === activeThread.messages.length - 1) { doNothing(event); } else { @@ -1741,13 +1759,7 @@ on:load={() => (themeLoaded = true)} on:error={() => (themeLoaded = true)} /> {/if} -
+
{#if _this.thread || _this.thread_id} {#await activeThread} Loading... @@ -1760,6 +1772,9 @@ ? 'expanded-mailbox-thread' : ''}">
@@ -1842,7 +1857,9 @@ contact={contacts[message?.from[0].email]} />
{/if} -
+
{userEmail && message?.from[0].email === userEmail ? "me" @@ -1858,7 +1875,9 @@ content={message?.from[0].email} />
-
+
{#if message?.to} {#await getAllRecipients( { to: message.to, cc: message.cc, bcc: message.bcc }, ) then allRecipients} {#each allRecipients.slice(0, PARTICIPANTS_TO_TRUNCATE) as recipient, i} @@ -1906,7 +1925,9 @@
{#if _this.show_received_timestamp} -
+
{formatExpandedDate( new Date(message.date * 1000), @@ -2123,6 +2144,9 @@ {:else}