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
This commit is contained in:
lilia 2016-09-10 14:57:43 -07:00
parent dbfa4c960d
commit 6a4b720b89
2 changed files with 4 additions and 6 deletions

View file

@ -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 {

View file

@ -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 {