Mobileweb Textfield hides hintText if value is set to an empty string
When creating a textfield with no value and hintText of 'required', setting the value to '' will cause the value to be shown instead of the hintText in mobileweb even though the value is empty.
This works correctly in iOS as a comparison.
Steps to reroduce:
1. Copy the code below into a new project
2. Run using MobileWeb
3. Note the textfield has no text
4. Run using iOS
5. Note the textfield says 'Required'
CODE:
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
win.open();
var view = Ti.UI.createView({
height: 500,
width: 500,
backgroundColor: 'blue'
});
var text = Ti.UI.createTextField({
hintText: 'Required',
backgroundColor: '#FFF',
width: 200,
height: 60
});
view.add(text);
//This line should not cause the hintText to disappear
text.value = '';
win.add(view);
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2907
Closing as fixed. Tested on: Titanium Studio, build: 3.0.0.201211301903 Titanium SDK, build: 3.0.0.v20121204181658 Device: iPhone 4 (5.1.1) Mac OS X Lion 10.7.5 - Safari Version 5.1.7, Google Chrome Version 23.0.1271.95