Skip to content

Commit ea3b6c0

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
Fix step selection in Recorder
it regressed at some time in the past. Missing stopPropagation was resetting the selection immediately. Bug: none Change-Id: I1497b3ee47e1f0bccc2f8e36f49fb2d86bdd2998 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7264765 Commit-Queue: Alex Rudenko <[email protected]> Reviewed-by: Ergün Erdoğmuş <[email protected]> Auto-Submit: Alex Rudenko <[email protected]>
1 parent e5585b8 commit ea3b6c0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

front_end/panels/recorder/components/RecordingView.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ export class RecordingView extends UI.Widget.Widget {
910910
}
911911

912912
#isTitleInvalid = false;
913-
#selectedStep?: Models.Schema.Step|null;
913+
#selectedStep: Models.Schema.Step|null = null;
914914
#replaySettingsExpanded = false;
915915
#showCodeView = false;
916916
#code = '';
@@ -1090,10 +1090,10 @@ export class RecordingView extends UI.Widget.Widget {
10901090
}
10911091

10921092
#onWrapperClick(): void {
1093-
if (this.#selectedStep === undefined) {
1093+
if (this.#selectedStep) {
10941094
return;
10951095
}
1096-
this.#selectedStep = undefined;
1096+
this.#selectedStep = null;
10971097
this.performUpdate();
10981098
}
10991099

front_end/panels/recorder/components/StepView.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
412412
}
413413
data-step-index=${input.stepIndex}
414414
data-section-index=${input.sectionIndex}
415-
@click=${() => {
415+
@click=${(event: Event) => {
416+
event.stopPropagation();
416417
const stepOrSection = input.step || input.section;
417418
if (stepOrSection) {
418419
input.onStepClick(stepOrSection);

0 commit comments

Comments
 (0)