[TIMOB-10156] MobileWeb: IE9/Chrome not showing or incorrectly showing the value of the textfields when text is aligned
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-08-09T15:04:21.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Sprint 2012-16 API, Release 3.0.0 |
Components | MobileWeb |
Labels | api, qe-port |
Reporter | Reymundo López |
Assignee | Bryan Hughes |
Created | 2012-07-25T15:27:29.000+0000 |
Updated | 2012-08-10T15:09:45.000+0000 |
Description
On IE if the width of the textField is too low, and the textAlign is set to TEXT_ALIGNMENT_CENTER, the value does not show until the user type something, but if the width is high enough the value is show but with a wrong alignment.
On Google Chrome the value is never displayed until the user types something in the field.
Steps to reproduce:
1 - Create app with this code:
var win = Ti.UI.createWindow({
backgroundColor:'#ffffff'
});
var textField1 = Ti.UI.createTextField({
right : 170,
top : 102,
width : 200,
height : 36,
borderStyle : Ti.UI.INPUT_BORDERSTYLE_LINE,
backgroundColor : 'white',
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
value: 1,
font : { fontSize : 24 }
});
var textField2 = Ti.UI.createTextField({
right : 170,
top : 190,
width : 50,
height : 36,
borderStyle : Ti.UI.INPUT_BORDERSTYLE_LINE,
backgroundColor : 'white',
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
value: 1,
font : { fontSize : 24 }
});
mainView.add(textField1);
mainView.add(textField2);
win.add(mainView);
win.open();
2 - Preview on the browser
Actual result (images attached):
IE9 does not show the value with the correct alignment and uses an arbitrary size for the textField, the value only appears when the user types something.
Chrome does not show the value until the user types something.
Expected result:
The textField shows the value with the correct alignment independently of the size of the textField
Attachments
File | Date | Size |
---|---|---|
Chrome.png | 2012-07-25T15:27:29.000+0000 | 4004 |
IE9 - TextField.png | 2012-07-25T15:27:29.000+0000 | 4285 |
Safari - TextField.png | 2012-07-25T15:27:29.000+0000 | 4250 |
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2692
Verified fix on: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120810080115 Android 4.0.4 - default ,chrome 18.0 Iphone 4.3.5 - safari mobile Mountain lion(10.8) - chrome 21.0,safari 6,firefox 14.0.1