Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ function initializeEditTextListeners(): void {
owner.dismissSoftInput();
dismissKeyboardTimeoutId = null;
}, 1);

owner.notify({ eventName: EditableTextBase.blurEvent, object: owner });
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* 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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down