fix(core): delegate should be set on nativeTextViewProtected (#8881)

just like textfields. Fixes components extending this one
This commit is contained in:
Martin Guillon
2020-09-24 01:14:39 +02:00
committed by Nathan Walker
parent 29da0fb5f7
commit 021c0bb9a2

View File

@@ -85,6 +85,7 @@ class NoScrollAnimationUITextView extends UITextView {
@CSSType('TextView')
export class TextView extends TextViewBaseCommon {
nativeViewProtected: UITextView;
nativeTextViewProtected: UITextView;
private _delegate: UITextViewDelegateImpl;
_isShowingHint: boolean;
public _isEditing: boolean;
@@ -114,11 +115,11 @@ export class TextView extends TextViewBaseCommon {
@profile
public onLoaded() {
super.onLoaded();
this.ios.delegate = this._delegate;
this.nativeTextViewProtected.delegate = this._delegate;
}
public onUnloaded() {
this.ios.delegate = null;
this.nativeTextViewProtected.delegate = null;
super.onUnloaded();
}