[TIMOB-1326] textArea.enable triggers focus of text area
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Trivial |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2012-06-22T13:01:06.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | enabled, focus, ios, text, widget |
| Reporter | Nolan Wright |
| Assignee | Neeraj Gupta |
| Created | 2011-04-15T02:49:28.000+0000 |
| Updated | 2017-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();
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.
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();Closing ticket as the issue cannot be reproduced.