Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1326] textArea.enable triggers focus of text area

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-06-22T13:01:06.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsenabled, focus, ios, text, widget
ReporterNolan Wright
AssigneeNeeraj Gupta
Created2011-04-15T02:49:28.000+0000
Updated2017-03-09T22:41:57.000+0000

Description

only happens on 3.1.x.

from customer ticket:

http://developer.appcelerator.com/helpdesk/view/29721">http://developer.appcelerator.com/helpdesk/view/29721

code:
var win = Ti.UI.createWindow();
var notesText = Titanium.UI.createTextArea({

value: "location_notes_go_here",
textAlign:'left',
enabled:false,
font: {fontSize: 12, fontWeight:'bold'}, 
color:'#000',
top:10,
bottom:5,
left:10,
width:300,
height:100,
keyboardType:Titanium.UI.KEYBOARD_DEFAULT,
returnKeyType:Titanium.UI.RETURNKEY_DONE

}); win.add(notesText);
var b = Ti.UI.createButton({text:'enable',height:30,width:200});
win.add(b);

b.addEventListener('click', function()
{

notesText.enabled = (notesText.enabled)?false:true;

});

win.open();

Comments

  1. Stephen Tramer 2011-04-15

    Gonna bump. This could very well be an Apple bug, but there might be a workaround. 3.1.x support is also becoming increasingly irrelevant.

  2. Vishal Duggal 2012-06-22

    Used this code to test. Did not see any focus or blur events from text area on changing enabled
       var win = Ti.UI.createWindow();
       var notesText = Titanium.UI.createTextArea({
       	value: "location_notes_go_here",
       	textAlign:'left',
       	enabled:false,
       	font: {fontSize: 12, fontWeight:'bold'}, 
       	color:'#000',
       	top:10,
       	bottom:5,
       	left:10,
       	width:300,
       	height:100,
       	keyboardType:Titanium.UI.KEYBOARD_DEFAULT,
       	returnKeyType:Titanium.UI.RETURNKEY_DONE
       }); 
       win.add(notesText);
       var b = Ti.UI.createButton({title:'enable',height:30,width:200});
       win.add(b);
       
       b.addEventListener('click', function()
       {
       	notesText.enabled = (notesText.enabled)?false:true;
       });
       
       
       notesText.addEventListener('focus',function(e){
       	Ti.API.info('FOCUS ON TEXT AREA');
       })
       notesText.addEventListener('blur',function(e){
       	Ti.API.info('BLUR ON TEXT AREA');
       })
       win.open();
       
  3. Lee Morris 2017-03-09

    Closing ticket as the issue cannot be reproduced.

JSON Source