[TIMOB-27379] Windows:Using hint text on Textfield and 'passwordMask' property is true, the hint text is not shown when the TextField is cleared programmatically
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Resolved |
Resolution | Not Our Bug |
Resolution Date | 2019-09-10T06:55:28.000+0000 |
Affected Version/s | Release 8.1.1 |
Fix Version/s | n/a |
Components | Windows |
Labels | engSchedule |
Reporter | Rakhi Mitro |
Assignee | Kota Iguchi |
Created | 2019-09-05T06:28:06.000+0000 |
Updated | 2019-12-02T23:06:32.000+0000 |
Description
For a TextField with hint text, if the 'passwordMask' property is true, the hint text is not shown when the TextField is cleared programmatically like on click of a button like below.
btnReset.addEventListener('click', function (e) {
txtUsername.value = "";
txtPassword.value = "";
});
But, it works fine case of manual clearing of the same TextField. Also, for a TextField with 'passwordMask' property as false, it works without any issue in both manual and programatic clearing of the field.The customer is facing issue on *Windows 10 version 1809 desktop*.It Works fine for Android and iOS.
A screenshot is posted to the click of Reset button. On that button click, text fields are cleared. But, hint text is restored only for the Username field and not for Password field.
*Testing Environment:*
SDK version: 7.2.0 GA,8.1.1.GA,8.0.2.GA,
CLI version: 7.0.12
Device: Windows 10 version 1809 desktop.
*Sample test case:*
AppStart();
function AppStart()
{
var loginWindow = createLogin("Login", "Login to App");
loginWindow.open();
}
function createLogin(title, message) {
var win = Ti.UI.createWindow({
title: title,
backgroundColor: '#fff'
});
var label = Ti.UI.createLabel({
text: message,
color: "#333",
font: {
fontSize: 20
}
});
label.top = "10%";
label.left = "5%";
label.height = "6%";
label.width = "35%";
label.title = "Login";
win.add(label);
var txtUsername = Ti.UI.createTextField({ top: "20%", left: "5%", height: "6%", width: "55%", passwordMask: false, paddingLeft: 15 });
var txtPassword = Ti.UI.createTextField({ top: "30%", left: "5%", height: "6%", width: "55%", passwordMask: true, paddingLeft: 15 });
txtUsername.hintText = 'Username';
txtPassword.hintText = 'Password';
win.add(txtUsername);
win.add(txtPassword);
var btnReset = Ti.UI.createButton();
btnReset.top = "40%";
btnReset.left = "35%";
btnReset.height = "6%";
btnReset.width = "25%";
btnReset.title = "Reset";
btnReset.addEventListener('click', function (e) {
ResetFields();
});
function ResetFields()
{
txtUsername.value = "";
txtPassword.value = "";
}
win.add(btnReset);
return win;
}
*Test Steps:*
1. Open the app.
2. Enter some values in Username and Password fields.
3.Click the Reset button which programmatically clear the Text Fields.
*Test Output:*
*Curent Result:* Password field cleared and hint text is not shown.
*Expected Result:* Password field cleared and hint text to be shown.
Attachments
File | Date | Size |
---|---|---|
image.png | 2019-09-05T06:27:58.000+0000 | 13849 |
I was able to reproduce this issue but I'm afraid to say that we would resolve this as "Not Our Bug". I see that this is a bug that Microsoft implements in Windows 10 Creator's Update 15063. (See https://social.msdn.microsoft.com/Forums/en-US/9f52e087-c09a-4942-87fd-9107d3419a5a/uwppasswordbox-placeholdertext-not-working-after-update-to-creators-update-15063?forum=wpdevelop). Microsoft have been ignoring this issue since 2017.