[TIMOB-877] iOS: TextField editable:false not implemented
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-06-19T10:59:49.000+0000 |
| Affected Version/s | Release 1.6.0, Release 2.1.0 |
| Fix Version/s | Sprint 2012-13 API, Release 3.0.0 |
| Components | iOS |
| Labels | api, module_textfield, parity, qe-testadded, triage |
| Reporter | Bill Dawson |
| Assignee | Ingo Muschenetz |
| Created | 2011-04-15T02:38:21.000+0000 |
| Updated | 2013-11-07T05:31:06.000+0000 |
Description
Here's an app.js for a fail case: https://gist.github.com/d116232ef3ba72a4d26e">https://gist.github.com/d116232ef3ba72a4d26e I'm able to enter the field, get the keyboard and enter text. BTW, TextArea is okay.
Bill ran across this while we were fixing an issue for a premium account. It wasn't implemented on Android. It does work for TextArea on iPhone.
Bug Scrub: Valid. No test Case exists (Used Provided Code) Tested On: Mac OSX Lion TiMob Version: 1.7.2 TiStud Version: 1.0.2 Devices used: iPhone 4.2.10
Confirmed on iOS Simulator 5.0.
Test Code
var win1 = Titanium.UI.createWindow({ backgroundColor:'#fff' }); var tf = Ti.UI.createTextField({ borderColor:'black', borderWidth:1, width:200, height:40 }) var b1 = Ti.UI.createButton({ top:0, left:0, title:'Editable?' }) b1.addEventListener('click',function(e){ if(tf.editable == true) { alert('Editable true'); } else { alert('Editable false'); } }) var b2 = Ti.UI.createButton({ top:0, right:0, title:'Toggle' }) b2.addEventListener('click',function(e){ var editable = tf.editable; tf.editable = !editable; }) var b3 = Ti.UI.createButton({ bottom:0, left:0, title:'Enabled?' }) b3.addEventListener('click',function(e){ if(tf.enabled == true) { alert('Enabled true'); } else { alert('Enabled false'); } }) var b4 = Ti.UI.createButton({ bottom:0, right:0, title:'Toggle' }) b4.addEventListener('click',function(e){ var editable = tf.enabled; tf.enabled = !editable; }) win1.add(b1); win1.add(b2); win1.add(b3); win1.add(b4); win1.add(tf); win1.open();Pull merged.
Verified fixed with : Mobile sdk-2.2.0.v20120810080115 Titanium Studio, build: 2.1.1.201207271312 Device: iPhone 4 Ipad 5.1
Please re-open this. It is still happening for textfields on 2.1.3.GA Sample code:
Even after setting the editable directly or through setEditable to false, the field remains editable.var fBirthday = ui.text({ width: 280.5, height: 44, paddingLeft: 95, backgroundImage: "img/signup/fBirthday.png", hintText: "Selecionar...", font: { fontFamily: "DINNeuGroBolCon", fontSize: 17 }, color: "#676767", editable: false }); win.add(fBirthday);thoughts?I can confirm that the editable:false option is not working on a simple example:
var tf = Ti.UI.createTextField({ width: 280, height: 44, hintText: "Selecionar...", font: { fontFamily: "Helvetica Neue", fontSize: 18 }, color: "#676767", editable: false }); var w = Ti.UI.createWindow(); w.add(tf); w.open();This was fixed in release 2.2.0, which means the fix is available off the 3.0.0 and master CI builds. This is not fixed in the 2_1_X branch so it is not fixed in the 2.1.3 GA release. And yes I have verified that this is indeed fixed in 3_0_X and master branches.
Reopening to update labels
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4863