mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00

committed by
Hristo Hristov

parent
b6b5465d32
commit
9437f49aed
@ -4,6 +4,7 @@ import { TextBase, Property, CssProperty, Style, Color, booleanConverter, makeVa
|
||||
export * from "../text-base";
|
||||
|
||||
export abstract class EditableTextBase extends TextBase implements EditableTextBaseDefinition {
|
||||
public static blurEvent = "blur";
|
||||
|
||||
public keyboardType: KeyboardType;
|
||||
public returnKeyType: ReturnKeyType;
|
||||
|
@ -90,6 +90,8 @@ function initializeEditTextListeners(): void {
|
||||
owner.dismissSoftInput();
|
||||
dismissKeyboardTimeoutId = null;
|
||||
}, 1);
|
||||
|
||||
owner.notify({ eventName: EditableTextBase.blurEvent, object: owner });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,8 @@ import { TextBase, Property, CssProperty, Style, Color, FormattedString } from "
|
||||
* Represents the base class for all editable text views.
|
||||
*/
|
||||
export class EditableTextBase extends TextBase {
|
||||
public static blurEvent: string;
|
||||
|
||||
/**
|
||||
* Gets or sets the soft keyboard type.
|
||||
*/
|
||||
|
@ -10,6 +10,7 @@ export abstract class EditableTextBase extends EditableTextBaseCommon {
|
||||
public nativeView: UITextField | UITextView;
|
||||
public dismissSoftInput() {
|
||||
this.nativeView.resignFirstResponder();
|
||||
this.notify({ eventName: EditableTextBase.blurEvent, object: this });
|
||||
}
|
||||
|
||||
[keyboardTypeProperty.getDefault](): "datetime"| "phone" | "number" | "url" | "email" | string {
|
||||
|
Reference in New Issue
Block a user