Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10020] iOS: Textfields are editable even when editable is set to false.

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2012-07-18T11:39:22.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sn/a
ComponentsiOS
Labelsapi
ReporterJoel Koett
AssigneeNeeraj Gupta
Created2012-07-13T15:13:13.000+0000
Updated2017-03-09T21:28:41.000+0000

Description

Problem

When the editable property is set to false, the text field can still be edited.

Code to reproduce


var win = Ti.UI.createWindow({
	backgroundColor: 'pink'
});
win.open();
var textField = Ti.UI.createTextField({
        color: '#336699',
        height: 60,
        top: 10,
        left: 10,
        width: 250,
        borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
        editable: false,
        value: 'hello'
    });
win.add(textField);

Expected behavior

Text field can not be edited.

Comments

  1. Joel Koett 2012-07-13

    Current workaround: textField.addEventListener('focus', function(e) { e.source.blur(); });
  2. Vishal Duggal 2012-07-18

    Duplicate of TIMOB-877.
  3. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source