[AC-850] Alloy: Empty TSS selectors cause buggy rendering
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-02-03T15:13:48.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | TCSupportTriage |
Reporter | Noah Lively |
Assignee | Mauro Parra-Miranda |
Created | 2014-08-14T23:55:17.000+0000 |
Updated | 2016-03-08T07:37:08.000+0000 |
Description
I was experiencing erratic rendering of my alloy views after upgrading to the latest production release of Alloy (1.4.1) and TI SDK (3.3.0). Upon investigating the rendered JS files after running "titanium build" from the console, I discovered that empty TSS selectors were causing the erratic rendering.
Here's the scenario.
*TSS File 1 (app.tss):*
".blue_button": {
backgroundColor: "blue",
height: '60dp'
},
".blue_button[formFactor=tablet]": {
}
*TSS File 2 (my_view.tss):*
".blue_button": {
title: "Click Me"
}
The compiled app shows up fine on a tablet but not on a phone. One a phone the button will not have a label; on a tablet, it will.
When I removed the empty selector from *File 1*, rendering started working as I intended it.
So far I have only had this experience on iOS (simulator included)
Working fine since 3.3.x+