From 6a4b720b898ae5ffdc71c2b1ca2f531e371e090c Mon Sep 17 00:00:00 2001 From: lilia Date: Sat, 10 Sep 2016 14:57:43 -0700 Subject: [PATCH] Make timestamp text selectable Previously we only declared the message body as selectable, but Chrome's implementation of user-select is a little quirky in that it allows unselectable text to be copied if you select elements around it. Oddly enough, styling the entire bubble contents as selectable, including the timestamp, actually prevents chrome from copying the timestamp text when it's not supposed to, i.e., when triple-clicking the message body. Fixes #887 // FREEBIE --- stylesheets/_conversation.scss | 3 +-- stylesheets/manifest.css | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/stylesheets/_conversation.scss b/stylesheets/_conversation.scss index 56648d58..24e32c6f 100644 --- a/stylesheets/_conversation.scss +++ b/stylesheets/_conversation.scss @@ -289,13 +289,13 @@ li.entry .error-icon-container { margin-left: 8px; max-width: 30em; text-align: -webkit-auto; + -webkit-user-select: text; @media(max-width: $big-avatar-min-width - 1px) { max-width: calc(100% - 45px - #{$error-icon-size}); // avatar size + padding + error-icon size } .body { - -webkit-user-select: text; white-space: pre-wrap; a { @@ -387,7 +387,6 @@ li.entry .error-icon-container { .bubble { .content { font-style: italic; - -webkit-user-select: text; } &::before, &::after { diff --git a/stylesheets/manifest.css b/stylesheets/manifest.css index 64336cb5..bcc918a1 100644 --- a/stylesheets/manifest.css +++ b/stylesheets/manifest.css @@ -1122,14 +1122,14 @@ li.entry .error-icon-container { word-wrap: break-word; margin-left: 8px; max-width: 30em; - text-align: -webkit-auto; } + text-align: -webkit-auto; + -webkit-user-select: text; } @media (max-width: 899px) { .message-container .bubble, .message-list .bubble { max-width: calc(100% - 45px - 24px); } } .message-container .bubble .body, .message-list .bubble .body { - -webkit-user-select: text; white-space: pre-wrap; } .message-container .bubble .body a, .message-list .bubble .body a { @@ -1209,8 +1209,7 @@ li.entry .error-icon-container { clear: left; } .message-container .control .bubble .content, .message-list .control .bubble .content { - font-style: italic; - -webkit-user-select: text; } + font-style: italic; } .message-container .control .bubble::before, .message-container .control .bubble::after, .message-list .control .bubble::before, .message-list .control .bubble::after {