mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
fix(text-view): only reload text if hint is showing on ios (#8662)
This commit is contained in:
@ -88,7 +88,7 @@ class NoScrollAnimationUITextView extends UITextView {
|
|||||||
export class TextView extends TextViewBaseCommon {
|
export class TextView extends TextViewBaseCommon {
|
||||||
nativeViewProtected: UITextView;
|
nativeViewProtected: UITextView;
|
||||||
private _delegate: UITextViewDelegateImpl;
|
private _delegate: UITextViewDelegateImpl;
|
||||||
private _isShowingHint: boolean;
|
_isShowingHint: boolean;
|
||||||
public _isEditing: boolean;
|
public _isEditing: boolean;
|
||||||
|
|
||||||
private _hintColor = (majorVersion <= 12 || !UIColor.placeholderTextColor) ? UIColor.blackColor.colorWithAlphaComponent(0.22) : UIColor.placeholderTextColor;
|
private _hintColor = (majorVersion <= 12 || !UIColor.placeholderTextColor) ? UIColor.blackColor.colorWithAlphaComponent(0.22) : UIColor.placeholderTextColor;
|
||||||
@ -129,7 +129,9 @@ export class TextView extends TextViewBaseCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public textViewShouldBeginEditing(textView: UITextView): boolean {
|
public textViewShouldBeginEditing(textView: UITextView): boolean {
|
||||||
this.showText();
|
if (this._isShowingHint) {
|
||||||
|
this.showText();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user