Skip to content

Commit f7f6435

Browse files
authored
fix(html): prevent unnecessary text selection on chips (microsoft#36718)
1 parent 2b14486 commit f7f6435

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/html-reporter/src/chip.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
white-space: nowrap;
2828
overflow: hidden;
2929
text-overflow: ellipsis;
30+
user-select: none;
31+
}
32+
33+
.chip-header-allow-selection {
34+
user-select: text;
3035
}
3136

3237
.chip-header.expanded-false {

packages/html-reporter/src/testFileView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const TestFileView: React.FC<React.PropsWithChildren<{
3737
expanded={isFileExpanded(file.fileId)}
3838
noInsets={true}
3939
setExpanded={(expanded => setFileExpanded(file.fileId, expanded))}
40-
header={<span>
40+
header={<span className='chip-header-allow-selection'>
4141
{file.fileName}
4242
</span>}>
4343
{file.tests.map(test =>

0 commit comments

Comments
 (0)