Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1227] Soft Keyboard not showing on textfield focus on Galaxy Nexus 4.2.2

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-09-29T02:51:01.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labels3.5.0GA, android, keyboard, regression, textfield
ReporterDário Marcelino
AssigneeShak Hossain
Created2015-02-25T10:26:57.000+0000
Updated2016-03-08T07:37:36.000+0000

Description

Hi, recently a client complained about not being able to input values on our app on her Galaxy Nexus. I was a bit astonished but then I tested it using an AVD configured as Galaxy Nexus SDK 4.2.2 and found out she was right. It's very easy to reproduce this, create a Hello World app using the classical template and use the below code on your app.js file. Run it against: * AVD device Galaxy Nexus, SDK 4.2.2: soft keyboard never shows; * AVD device Nexus 5, SDK 5: soft keyboard shows up when pressing a textfield (as expected).
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});

// Create a TextField.
var aTextField = Ti.UI.createTextField({
	height : 35,
	top : 10,
	left : 40,
	width : 240,
	hintText : 'This is hint text 1',
	softKeyboardOnFocus : Ti.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS, // Android only
	keyboardType : Ti.UI.KEYBOARD_DEFAULT,
	returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
	borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED
});

// Listen for return events.
aTextField.addEventListener('return', function(e) {
	aTextField.blur();
	alert('Input was: ' + aTextField.value);
});


// Create a TextField.
var aTextField2 = Ti.UI.createTextField({
  height : 35,
  top : 60,
  left : 40,
  width : 240,
  hintText : 'This is hint text 2',
  softKeyboardOnFocus : Ti.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS, // Android only
  keyboardType : Ti.UI.KEYBOARD_DEFAULT,
  returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
  // borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED // just to be sure it's not caused by TIMOB-9574
});

// Listen for return events.
aTextField2.addEventListener('return', function(e) {
  aTextField2.blur();
  alert('Input was: ' + aTextField2.value);
});


// Add to the parent view.
win1.add(aTextField);
win1.add(aTextField2);

// open window
win1.open();

Comments

  1. Dário Marcelino 2015-03-12

    @Radamantis Torres-Lechuga, any update on this? Thanks
  2. Mostafizur Rahman 2015-08-25

    Hello, Its not a bug. Works on updated environment. *Testing Environment:* Appcelerator Studion: 4.2.0.201508062204 Titanium SDK: 4.1.0.GA OS X Version: 10.9.5 Android device: Nexus 7(5.1.1) Thanks

JSON Source