mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix text & fromattedText failing tests
This commit is contained in:
@@ -28,6 +28,7 @@ export class TextBase extends TextBaseCommon {
|
||||
let spannableStringBuilder = createSpannableStringBuilder(value);
|
||||
const text = (spannableStringBuilder === null || spannableStringBuilder === undefined) ? '' : <any>spannableStringBuilder;
|
||||
this._nativeView.setText(text);
|
||||
textProperty.nativeValueChange(this, (value === null || value === undefined) ? '' : value.toString());
|
||||
|
||||
if (spannableStringBuilder && this._nativeView instanceof android.widget.Button &&
|
||||
!(this._nativeView.getTransformationMethod() instanceof TextTransformation)){
|
||||
|
||||
@@ -49,9 +49,11 @@ export class TextBase extends TextBaseCommon {
|
||||
let nativeView = this.nativeView;
|
||||
if (nativeView instanceof UIButton) {
|
||||
nativeView.setAttributedTitleForState(mas, UIControlState.Normal);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
nativeView.attributedText = mas;
|
||||
}
|
||||
textProperty.nativeValueChange(this, (value === null || value === undefined) ? '' : value.toString());
|
||||
}
|
||||
|
||||
//Color
|
||||
|
||||
@@ -40,10 +40,6 @@ class UITextFieldDelegateImpl extends NSObject implements UITextFieldDelegate {
|
||||
}
|
||||
|
||||
owner.dismissSoftInput();
|
||||
|
||||
// if (owner.formattedText) {
|
||||
// formattedTextProperty.nativeValueChange(owner, textField.attributedText);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,10 +39,6 @@ class UITextViewDelegateImpl extends NSObject implements UITextViewDelegate {
|
||||
|
||||
owner.dismissSoftInput();
|
||||
owner._refreshHintState(owner.hint, textView.text);
|
||||
|
||||
// if (owner.formattedText) {
|
||||
// formattedTextProperty.nativeValueChange(owner, textView.attributedText);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user