Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export class HelpTipComponent implements OnInit {
}

private setFocus(): void {
const helpTipEl = window.document.querySelector('.tip');
timer(200).subscribe(() => {
const helpTipEl = window.document.querySelector('.tip');
this.focusManagerService.focusFirstElementInContainer(helpTipEl);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,11 @@ export class DeviceQualificationFromComponent implements OnInit, AfterViewInit {
if (question.type === FormControlType.SELECT_MULTIPLE) {
const answer: number[] = [];
question.options?.forEach((_, idx) => {
const value = this.deviceQualificationForm.value[index][idx];
if (value) {
answer.push(idx);
if (this.deviceQualificationForm.value[index]) {
const value = this.deviceQualificationForm.value[index][idx];
if (value) {
answer.push(idx);
}
}
});
response.answer = answer;
Expand Down
8 changes: 7 additions & 1 deletion modules/ui/src/app/pages/devices/devices.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,13 @@ export class DevicesComponent
const device = this.element.nativeElement.querySelectorAll(
'app-device-item .button-edit'
)[index];
device?.focus();
if (!this.hasDeviceTip()) {
device?.focus();
}
}

private hasDeviceTip() {
return window.document.querySelector('.tip');
}

private focusAddButton(): void {
Expand Down