[AC-767] iOS - Alloy: Clear button in a TextField doesn't work properly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-05T04:44:16.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | clear, textfield |
Reporter | Matej |
Assignee | Ritu Agrawal |
Created | 2014-03-02T21:04:40.000+0000 |
Updated | 2016-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
File | Date | Size |
---|---|---|
Alloy_TextField_bug.mov | 2014-03-02T21:04:40.000+0000 | 1374053 |
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,
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.
Marking it resolved with 3.2.1 SDK + Alloy 1.3.1 release.