Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20136] Android: PasswordMask not working on editable textfield

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-01-14T21:17:08.000+0000
Affected Version/sRelease 5.1.1
Fix Version/sRelease 5.4.0
ComponentsAndroid
Labelsandroid, qe-5.4.0
ReporterAndreas Graetz
AssigneeAshraf Abu
Created2015-12-10T08:30:42.000+0000
Updated2016-09-05T02:59:36.000+0000

Description

Using this code:
window = Ti.UI.createWindow({
	
});

password = Ti.UI.createTextField({
	passwordMask  : true,
	value : "this is a secret",
	editable : false,
	top : 100,	
	width : Ti.UI.FILL
});

switcher = Ti.UI.createButton({
	title : "Editable: "+password.getEditable(),
	top: 200
});

switcher.addEventListener("click",function(e){	
		password.setEditable(!password.getEditable());			
		switcher.setTitle("Editable: "+password.getEditable());
});

window.add(password);
window.add(switcher);
window.open();
The textfield "password" don't mask the content if field is not editable. If property editable is set to true, the value is masked. Works fine on iOS devices.

Comments

  1. Ashraf Abu 2016-01-11

    PR: https://github.com/appcelerator/titanium_mobile/pull/7623
  2. Ashraf Abu 2016-01-15

    PR merged.
  3. Josh Longton 2016-06-10

    Verified as fixed. 
Tested on:
 Nexus 5 (6.0.1) android emulator (6.0) 
Mac OSX El Capitan 10.11.4 Studio: 4.7.0.201606070951
 Ti SDK: 5.4.0.v20160608165242
 Appc NPM: 4.2.7-2 Appc CLI: 5.4.0-13 Node v0.12.7
 *Closing Ticket.*
  4. David Bankier 2016-09-05

    Has this PR created a regression issue? The previous behaviour was that if editable was false it would still respond to touch events. It no longer does. On Android it is equivalent to setting enabled as false.
  5. Ashraf Abu 2016-09-05

    [~davidbankier] You need a textfield that has been set editable to false respond to a touch event? Which version to which version is there a regression from what you can see?
  6. David Bankier 2016-09-05

    All previous versions, prior to 5.4.0. Eg. try 5.3.0.

JSON Source