diff --git a/src/survey.ts b/src/survey.ts index 085f3113f1..07604b1378 100644 --- a/src/survey.ts +++ b/src/survey.ts @@ -2333,7 +2333,7 @@ export class SurveyModel extends SurveyElementCore this.onEditingObjPropertyChanged = (sender: Base, options: any) => { if (!Serializer.hasOriginalProperty(this.editingObj, options.name)) return; - this.updateOnSetValue(options.name, options.newValue, options.oldValue); + this.updateOnSetValue(options.name, (this.editingObj)[options.name], options.oldValue); }; this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged); } diff --git a/tests/editingObjectTests.ts b/tests/editingObjectTests.ts index 649c92daea..590ba5e708 100644 --- a/tests/editingObjectTests.ts +++ b/tests/editingObjectTests.ts @@ -840,6 +840,8 @@ QUnit.test("Edit question string[] property type", function(assert) { dataListQuestion.value = "item1\nitem2\nitem3"; assert.equal(question.dataList.length, 3, "There are three items now"); assert.equal(question.dataList[2], "item3", "The third item is 'item3'"); + question.locDataList.setLocaleText(null, "abc\ndef"); + assert.equal(dataListQuestion.value, "abc\ndef", "Update edited question correctly"); }); QUnit.test("Edit custom array that returns values onGetValue", function( assert