Skip to content

Commit cecee51

Browse files
authored
Highlight label should not create extra span nodes (microsoft#164657)
* Highlight label should not create extra empty dom nodes I noticed that the `HighlightedLabel` class creates extra `span` elements for text ranges. These should not be needed. Using text children directly should be faster for creation and also reduce the number of nodes in the document I also related the conditional spread with a longer version that uses a simple call to push. This is worth doing since `HighlightedLabel` is so widely used in the editor * Update tests * Update smoke test selector * Update css
1 parent 52986b4 commit cecee51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

automation/src/quickinput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class QuickInput {
1212
private static QUICK_INPUT_ROW = `${QuickInput.QUICK_INPUT} .quick-input-list .monaco-list-row`;
1313
private static QUICK_INPUT_FOCUSED_ELEMENT = `${QuickInput.QUICK_INPUT_ROW}.focused .monaco-highlighted-label`;
1414
private static QUICK_INPUT_ENTRY_LABEL = `${QuickInput.QUICK_INPUT_ROW} .label-name`;
15-
private static QUICK_INPUT_ENTRY_LABEL_SPAN = `${QuickInput.QUICK_INPUT_ROW} .monaco-highlighted-label span`;
15+
private static QUICK_INPUT_ENTRY_LABEL_SPAN = `${QuickInput.QUICK_INPUT_ROW} .monaco-highlighted-label`;
1616

1717
constructor(private code: Code) { }
1818

0 commit comments

Comments
 (0)