Skip to content

Commit 92e3000

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
RPP: track annotation label change events
Bug: 406497770 Change-Id: I4fe1798468a1591d5bce6a841b29fc277f124190 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6404753 Auto-Submit: Jack Franklin <[email protected]> Reviewed-by: Alina Varkki <[email protected]> Commit-Queue: Alina Varkki <[email protected]>
1 parent 849d777 commit 92e3000

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ export class EntryLabelOverlay extends HTMLElement {
267267
if (labelBoxTextContent !== this.#label) {
268268
this.#label = labelBoxTextContent;
269269
this.dispatchEvent(new EntryLabelChangeEvent(this.#label));
270+
// Dispatch a fake change event; because we use contenteditable rather than an input, this event does not fire.
271+
// But we want to listen to the change event in the VE logs, so we dispatch it here.
272+
this.#inputField?.dispatchEvent(new Event('change', {bubbles: true, composed: true}));
270273
}
271274
this.#inputField?.setAttribute('aria-label', labelBoxTextContent);
272275
}
@@ -821,7 +824,7 @@ export class EntryLabelOverlay extends HTMLElement {
821824
this.#render();
822825
}}
823826
contenteditable=${this.#isLabelEditable ? 'plaintext-only' : false}
824-
jslog=${VisualLogging.textField('timeline.annotations.entry-label-input').track({keydown: true, click: true})}
827+
jslog=${VisualLogging.textField('timeline.annotations.entry-label-input').track({keydown: true, click: true, change: true})}
825828
tabindex="0"
826829
></span>
827830
${(() => {

0 commit comments

Comments
 (0)