Skip to content

Commit aab094c

Browse files
committed
custom prop "value" for textfieldchild to return parent value
copy MK and BS from parent to child
1 parent 038e028 commit aab094c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/modules/acroform.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,16 +2676,25 @@ var AcroFormTextFieldChild = function() {
26762676
return Boolean(this.Parent.V || this.Parent.DV);
26772677
}
26782678
});
2679+
2680+
Object.defineProperty(this, "value", {
2681+
enumerable: true,
2682+
configurable: true,
2683+
get: function() {
2684+
return this.Parent.value;
2685+
},
2686+
set: function(value) {
2687+
this.Parent.value = value;
2688+
}
2689+
});
26792690
};
26802691
inherit(AcroFormTextFieldChild, AcroFormTextField);
26812692

26822693
AcroFormTextFieldParent.prototype.createChild = function() {
26832694
var child = new AcroFormTextFieldChild();
26842695
child.Parent = this;
2685-
2686-
// fixme test these
2687-
// child.BS = Object.assign({}, child.Parent._BS);
2688-
// child.MK = Object.assign({}, child.Parent._MK);
2696+
child.BS = Object.assign({}, child.Parent._BS);
2697+
child.MK = Object.assign({}, child.Parent._MK);
26892698

26902699
this.Kids.push(child);
26912700
addField.call(this.scope, child);

0 commit comments

Comments
 (0)