Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-877] iOS: TextField editable:false not implemented

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-06-19T10:59:49.000+0000
Affected Version/sRelease 1.6.0, Release 2.1.0
Fix Version/sSprint 2012-13 API, Release 3.0.0
ComponentsiOS
Labelsapi, module_textfield, parity, qe-testadded, triage
ReporterBill Dawson
AssigneeIngo Muschenetz
Created2011-04-15T02:38:21.000+0000
Updated2013-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.

Comments

  1. Don Thorp 2011-04-15

    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.

  2. Vikramjeet Singh 2011-08-04

    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
  3. Chris Barber 2012-01-18

    Confirmed on iOS Simulator 5.0.
  4. Vishal Duggal 2012-06-28

    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();
       
  5. Blain Hamon 2012-06-29

    Pull merged.
  6. Rima Umbrasas 2012-08-14

    Verified fixed with : Mobile sdk-2.2.0.v20120810080115 Titanium Studio, build: 2.1.1.201207271312 Device: iPhone 4 Ipad 5.1
  7. Ygor Lemos 2012-10-30

    Please re-open this. It is still happening for textfields on 2.1.3.GA Sample code:
       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);
       
    Even after setting the editable directly or through setEditable to false, the field remains editable.
       fBirthday.editable = false;
       fBirthday.setEditable(false);
       
    thoughts?
  8. Kevin Whinnery 2012-10-30

    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();
       
  9. Vishal Duggal 2012-10-30

    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.
  10. Dhirendra Jha 2013-06-19

    Reopening to update labels
  11. Shameer Jan 2013-11-07

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4863

JSON Source