Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13112] MobileWeb: keyboard is not shown when TextField is programmatically focused

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T20:10:11.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelsn/a
ReporterYaroslav Pidstryhach
AssigneeChris Barber
Created2013-03-18T17:26:48.000+0000
Updated2018-04-04T23:20:16.000+0000

Description

*Reproduction steps:* Create a TextField. Call the focus() method of the TextField. (or run the test code below / attached project, and press the Focus button) *Expected behavior:* The keyboard is shown. *Actual behavior:* The keyboard isn't shown. *Additional information:* The keyboard will show if the TextField is focused manually by tapping it. Worked before version 3. *Test code:*
	var win = Ti.UI.createWindow({
			backgroundColor:'#FFFFFF'
		}),
		tf1 = Titanium.UI.createTextField({
			color:'#336699',
			height:35,
			top:10,
			width:250,
		}),
		l = Titanium.UI.createLabel({
			top:60,
			width:300,
			height:'auto',
			color:'#000',
			text:'do something like click a button...'
		});
	
	win.add(l);
	
	tf1.addEventListener('focus',function(e) {
		l.text = 'focus received, val = ' + e.value;
	});
	
	tf1.addEventListener('blur',function(e) {
		l.text = 'blur received, val = ' + e.value;	
	});
	
	win.add(tf1);
	
	//
	// FOCUS
	//
	var focusLabel = Titanium.UI.createButton({
		top:100,
		height:40,
		width:200,
		title:'Focus'
	});
	win.add(focusLabel);
	focusLabel.addEventListener('click', function() {
		tf1.focus();
	});
	
	//
	// BLUR
	//
	var blurLabel = Titanium.UI.createButton({
		top:150,
		height:40,
		width:200,
		title:'Blur'
	});
	win.add(blurLabel);
	blurLabel.addEventListener('click', function() {
		tf1.blur();
	});
	
		
	win.open();

Attachments

FileDateSize
TestKeyboard.zip2013-03-18T17:26:48.000+00001552436

Comments

  1. Davide Cassenti 2013-03-19

    Hello, what device(s) are you testing on? Does it work on the browser for you?
  2. Yaroslav Pidstryhach 2013-03-19

    Can be reproduced in Android 4 (emulator and actual device) by loading the MobileWeb app in the browser. This bug can also be seen in a compiled Android application (this will be a separate issue though).
  3. Davide Cassenti 2013-03-19

    I actually do see the same issue with 2.1.4: would you confirm that?
  4. 99 Red Balloons 2014-04-14

    Have also encountered this issue on Titanium SDK 3.2.2.GA. Any workaround for this? On iOS and Anroid, it's working fine.
  5. Lee Morris 2017-06-26

    Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
  6. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source