[TIMOB-26458] Android textfield.focus() is not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Done |
Resolution Date | 2018-12-10T06:51:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Rakhi Mitro |
Assignee | Unknown |
Created | 2018-10-17T12:46:43.000+0000 |
Updated | 2018-12-10T06:51:42.000+0000 |
Description
Using 7.4.0.GA android textfield.focus() is not working. After running the app, the cursor blinks perfectly but Keypad is not getting popped up.
*Test Environments:*
Appcelerator Command-Line Interface, version 7.0.6
Operating System
Name = Mac OS X
Version = 10.13.6
Architecture = 64bit
CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 8.9.1
npm Version = 5.5.1
Titanium CLI
CLI Version = 5.1.1
Titanium SDK
SDK Version = 7.4.0.GA
Device: Huawei y9 2018(Android 8),Huawei GR3 (Android 7)
*Test Steps:*
1. Open studio
2. Paste the sample code and run
3. After running observe that ,the cursor blinks perfectly but Keypad is not getting popped up.
*Test code:*
*index.js*
function winFocus(e) {//winFocus is called on onOpen event
if (OS_IOS) {
$.amountValue.focus();
} else {
$.amountValue.focus();
// $.amountValue.softKeyboardOnFocus = Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS;
}
}
$.WindowClass.open();
*index.xml*
<Alloy>
<Window id="makePaymentWin" id="WindowClass" onOpen="winFocus">
<TextField id="amountValue" class="valueText" ></TextField>
</Window>
</Alloy>
*index.tss*
"#amountValue":{
maxLength: 6,
// height: '30',
width:'80%',
bottom: '0',
focusable: true,
returnKeyType: Titanium.UI.RETURNKEY_DONE
}
".valueText": {
top: '0',
left: '0',
width: Ti.UI.FILL,
height: Titanium.UI.SIZE,
//color: Alloy.Globals.Styles.Colors.plainText,
keyboardType: Titanium.UI.KEYBOARD_TYPE_DECIMAL_PAD,
backgroundColor: "transparent",
backgroundImage: "transparent"
}
*Test Result:*. See the attachment section.
Attachments
File | Date | Size |
---|---|---|
Screenshot_20181017-183643.png | 2018-10-17T12:46:27.000+0000 | 41424 |
No comments