[TIMOB-24203] iOS: TextField ignores backgroundColor when borderStyle set
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-12-13T10:27:06.000+0000 |
Affected Version/s | Release 6.0.0, Release 5.4.0, Release 5.5.1 |
Fix Version/s | Release 6.1.0 |
Components | iOS |
Labels | ios, qe-6.1.0 |
Reporter | Baharroth |
Assignee | Hans Knöchel |
Created | 2016-12-09T13:34:56.000+0000 |
Updated | 2016-12-13T18:00:46.000+0000 |
Description
When you use the borderStyle property on IOS on a textfield, the SDK wrap your textfield in a view.
The parent view keep the backgroundColor of the original textfield but the child has a white backgroundcolor.
The parent should use a backgroundColor transparent and the child the backgroundcolor of the orignal textfield
".container": {
backgroundColor: "red"
}
"TextField": {
borderStyle: Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
width: 200,
height: 100,
backgroundColor: 'green'
}
<Alloy>
<Window class="container">
<TextField></TextField>
</Window>
</Alloy>
Attachments
File | Date | Size |
---|---|---|
Simulator Screen Shot 9 déc. 2016 14.29.39.png | 2016-12-09T13:33:28.000+0000 | 24493 |
Just tested this myself. Removing borderStyle lets the backgroundColor work again. Tested also in 5.4.0.GA for good measure, it was broken there too
Problem: The background-color was applied to the wrong view layer (behind the real
UITextField
). Fixed that. PR: https://github.com/appcelerator/titanium_mobile/pull/8671 Test-Case:Verified as fixed, the text field now uses backgroundColor when borderStyle is also set. Tested on: {noformat} macOS Sierra 10.12.1 iPhone 6 (10.0) iOS Simulator (9.1, 10.1) Xcode 8.1 Ti SDK: 6.1.0.v20161213022709 Appc NPM: 4.2.8 App CLI: 6.1.0-319 Node v4.6.0 {noformat} *Closing Ticket.*