mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge pull request #310 from NativeScript/focus
Fixed: TextField and TextView do not show the soft keyboard when their ...
This commit is contained in:
@@ -109,6 +109,16 @@ export class EditableTextBase extends common.EditableTextBase {
|
||||
}
|
||||
}
|
||||
|
||||
public focus(): boolean {
|
||||
var result = super.focus();
|
||||
|
||||
if (result && this._nativeView) {
|
||||
this._imm.showSoftInput(this._nativeView, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public _onTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
|
||||
if (this._android) {
|
||||
this.android.setText(data.newValue + "", android.widget.TextView.BufferType.EDITABLE);
|
||||
|
||||
Reference in New Issue
Block a user