[TIMOB-23338] Windows: Ti.UI.Button - Color property sets background color instead of text color
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-05-09T17:10:02.000+0000 |
Affected Version/s | Release 5.2.2 |
Fix Version/s | Release 5.3.0 |
Components | n/a |
Labels | qe-5.3.0 |
Reporter | Jonas Bjurhult |
Assignee | Christopher Williams |
Created | 2016-05-03T12:38:56.000+0000 |
Updated | 2016-05-10T22:42:08.000+0000 |
Description
According to http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Button-property-color the color property should set the text color of a button. Currently it sets and overrides any previously set backgroundColor.
Example:
index.xml
<Alloy>
<Window class="container">
<Button id="btn" onClick="doClick">Button 1</Button>
<Button id="btn2" onClick="doClick2">Button 2</Button>
</Window>
</Alloy>
index.tss
".container": {
backgroundColor:"white",
layout: 'vertical'
}
"#btn": {
width: Ti.UI.SIZE,
backgroundColor: "blue",
color: "red"
}
"#btn2": {
width: Ti.UI.SIZE,
backgroundColor: "blue",
}
index.js
function doClick(e) {
$.btn.color = "blue";
}
function doClick2(e) {
$.btn2.color = "yellow";
}
$.index.open();
Hello, I am able to reproduce this issue with given code and given step on Windows Phone. *Steps:* 1. Create an alloy project with given code for Windows Phone. 2. Build and run the app on Windows Phone. 3. Click the first button. >> Background color of the button is changed to blue. Code says:
According to documentation color property refers to text color of a Button. But in reality it is referring to background color of the button. 4. Click the second button. >> Same thing happens. Thanks *Environment*: *OS :* Microsoft Windows 8.1 Enterprise N *Device info:* Microsoft Lumia 640 (Windows Phone 8.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.4.0.v20160429102159 *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
https://github.com/appcelerator/titanium_mobile_windows/pull/676
Merged to 5_3_X, cherry-picked to master
master: https://github.com/appcelerator/titanium_mobile_windows/pull/679
Verified as fixed. Tested on: Nokia Lumia 928 (8.1) Windows Simulator (8.1) Microsoft Lumia 640 (10) Windows Simulator (10) Windows 10 Studio: 4.6.0.201605030516 Ti SDK: 5.3.0.v20160509143032 Appc NPM: 4.2.5-5 App CLI: 5.3.0-44 Node v0.12.7 *Closing Ticket.*