Merge "Fix for text selection in comment"

This commit is contained in:
Ben Rohlfs
2020-12-08 13:22:26 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ export function getRange(threadEl: HTMLElement): CommentRange | undefined {
// For Gerrit these are instances of GrCommentThread, but other gr-diff users
// have different HTML elements in use for comment threads.
// TODO: Also document the required HTML attritbutes that thread elements must
// have, e.g. 'comment-side', 'range', 'line-num', 'data-value'.
// have, e.g. 'diff-side', 'range', 'line-num', 'data-value'.
export interface GrDiffThreadElement extends HTMLElement {
rootId: string;
}

View File

@@ -552,9 +552,9 @@ export const htmlTemplate = html`
/** Make comments selectable when selected */
.selected-left.selected-comment
::slotted(gr-comment-thread[comment-side='left']),
::slotted(gr-comment-thread[diff-side='left']),
.selected-right.selected-comment
::slotted(gr-comment-thread[comment-side='right']) {
::slotted(gr-comment-thread[diff-side='right']) {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;