[AC-4954] 'postlayout' event not fired when property "run-on-main-thread" is set to true
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2017-05-10T12:20:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Hyperloop, Titanium SDK & CLI |
Labels | ios |
Reporter | Fabian Martinez |
Assignee | Shak Hossain |
Created | 2017-05-09T20:14:45.000+0000 |
Updated | 2017-05-10T12:20:20.000+0000 |
Description
If I set
<property name="run-on-main-thread" type="bool">true</property>
in tiapp.xml then the 'postlayout' event of any view is not fired.
An alloy test case may be index.js:
$.win.addEventListener('open', function(e){
console.log(e);
});
$.viewContent.addEventListener('postlayout', function(e){
console.log('viewContent');
console.log(e);
});
$.label.addEventListener('postlayout', function(e){
console.log('label');
console.log(e);
});
$.win.addEventListener('postlayout', function(e){
console.log(e);
});
$.win.open();
index.xml:
<Alloy>
<Window id="win" backgroundColor="#FFF">
<View id="viewContent">
<Label id="label">Hello, World</Label>
</View>
</Window>
</Alloy>
Expected result when preperty set to TRUE: view all the events log in the console.
What's happening: only the "open" event is fired.
If I set the property to FALSE, then all the events are logged.
This happens with 6.0.4.GA and 6.0.2.GA. I have tested this with sdk 6.1.0.v20170508081747 and works as expected (all events are fired).
The same happens with classic app (non Alloy), Hyperloop enabled, 6.0.4.GA, iOS (iphone7 10.3 emulator). If I create a new project and app.js is:
then the console log is:
if I switch to 6.1.0.v20170508081747 and recompile, the console log is:
Hey there, I remember we fixed this for 6.1.0, but 6.0.x was already out of the house. Release 6.1.0 is expected to be released around end of this month, you can already use the latest build from [here](http://builds.appcelerator.com/#6_1_X), I hope that helps!
Thank you for your response. Is there a release notes draft available to check what the build fixes?