[TIMOB-16101] LiveView don't apply new classes with Alloy $.resetClass()
| GitHub Issue | n/a |
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2020-05-19T16:03:16.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | LiveView |
| Labels | n/a |
| Reporter | Mauro Parra-Miranda |
| Assignee | Unknown |
| Created | 2013-11-24T19:29:28.000+0000 |
| Updated | 2020-05-19T16:03:16.000+0000 |
Description
Steps to Reproduce
When I use LiveView in Appcelerator Studio, the $.resetClass() Alloy function don't work…
$.resetClass reset all styles but don't add the new class (2nd argument of the function).
Example: $.resetClass('myLabel', 'Label Red');
Without LiveView, is work well !
Actual Result
$.resetClass don't apply new classes (reset all styles)
Expected Result
$.resetClass() apply new classes
Attachments
Hello Damien, can you please provide a testcase in the form of single app.js that reproduces the issue? TIA! Best, Mauro.
(from Mostafizur): I have tested this issue with my test code. I got this issue.
Testing environment:
OS: MAC OS X 10.8.5 Ti SDK: 3.1.3 GA Ti CLI: 3.2.0 IOS simulator 6.0 and 7.0 Alloy 1.2.2Test code
index.xml
<Alloy> <Window id="win" layout="vertical" backgroundColor="#fff" top="20"> <Button id="button" onClick="addClass" title="Add Class"/> <Button id="button" onClick="resetClass" title="Reset Class"/> <Label id="label" class="Label">Label</Label> </Window> </Alloy>index.tss
".coloronly" : { color: 'red' }, "Label" : { color: 'black', }index.js
function addClass() { $.addClass($.label, "coloronly"); } function resetClass() { $.resetClass($.label, "coloronly"); } $.win.open();Step to test
Create a new alloy project
Paste test code in index.js/index.xml/index.tss
Run on sim 7.0
Click on 'Add Class’ and 'Reset Class' button and look at label
No effect in Reset Class Button
ThanksI can't reproduce this on SDK 9.0.1/Alloy 1.14.6