Titanium JIRA Archive
Appcelerator Community (AC)

[AC-767] iOS - Alloy: Clear button in a TextField doesn't work properly

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2014-03-05T04:44:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsclear, textfield
ReporterMatej
AssigneeRitu Agrawal
Created2014-03-02T21:04:40.000+0000
Updated2016-03-08T07:37:02.000+0000

Description

clearButton will setup "autocorrect word" instead completely clear TextField value. This issue is quite dangerous in cases when is required validation. *XML:*
<Alloy>
	<Window>
		<TextField id="textField"/>
		<Button onClick="checkField"/>
	</Window>
</Alloy>
*TSS:*
"Window":{
    layout: "vertical",
    backgroundColor: "#F5F5F5"
}

"TextField":{
	width: 250, height: 45,
	hintText: "TextField",
	clearButtonMode: Ti.UI.INPUT_BUTTONMODE_ONFOCUS,
	borderRadius: 3,
	borderColor: "gray",
	top: 100
}

"Button":{
	width: 250, height: 45,
	title: "Done",
	top: 10,
	borderRadius: 3,
	borderColor: "gray",
	color: "gray"
}
*JS:*
$.index.open();

var checkField = function()
{
    var val = $.textField.value.trim();
    console.log(val.length + ", " + (val ? "(" + val + ")" : ""));	
};

Attachments

FileDateSize
Alloy_TextField_bug.mov2014-03-02T21:04:40.000+00001374053

Comments

  1. Ritu Agrawal 2014-03-03

    I tried to reproduce the issue with your test case and followed the exact steps you had provided but was not able to reproduce. Here is the output of the studio console [INFO] : BugTC3847/1.0 (3.2.1.GA.991027b) [INFO] : 6, (Qweasd) [INFO] : 6, (Qweasd) [INFO] : 6, (Qweasd) [INFO] : 6, (Qweasd) [INFO] : 0, [INFO] : 0, [INFO] : 0,
  2. Matej 2014-03-04

    Hi, have you seen that white bubble with auto correct word? The issue "works" only if this word is provided. // Ou, I got it. I have tested that issue with Ti 3.2.0 ,but now I tried 3.2.1 and it seems that is works properly.
  3. Ritu Agrawal 2014-03-05

    Marking it resolved with 3.2.1 SDK + Alloy 1.3.1 release.

JSON Source