fixed next and previous-step buttons for conditional questions on description editor
This commit is contained in:
parent
6facf9f7d4
commit
39e68bba77
|
@ -574,8 +574,13 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
if (this.step < this.maxStep) {//view is changing
|
||||
this.step = Math.floor(this.step + 1);
|
||||
let entry = this.visibleFieldSets[this.step - 1];
|
||||
this.table0fContents.onToCentrySelected(entry, false);
|
||||
this.scroll(entry);
|
||||
const targetElement = document.getElementById(entry.id);
|
||||
if (targetElement) {
|
||||
this.table0fContents.onToCentrySelected(entry, false);
|
||||
this.scroll(entry);
|
||||
} else {
|
||||
this.nextStep();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -584,8 +589,13 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
this.step = Math.ceil(this.step - 1);
|
||||
if (this.step >= 1) {
|
||||
let entry = this.visibleFieldSets[this.step - 1];
|
||||
this.table0fContents.onToCentrySelected(entry, false);
|
||||
this.scroll(entry);
|
||||
const targetElement = document.getElementById(entry.id);
|
||||
if (targetElement) {
|
||||
this.table0fContents.onToCentrySelected(entry, false);
|
||||
this.scroll(entry);
|
||||
} else {
|
||||
this.previousStep();
|
||||
}
|
||||
} else {
|
||||
this.table0fContents.onToCentrySelected(null, false);
|
||||
this.resetScroll();
|
||||
|
|
Loading…
Reference in New Issue