Mobileweb view doesn't appear if animate called before postlayout finishes (works in iOS)
When adding a view to a window and calling animate on the view, the view will not appear at all.
However, in iOS, the view will appear in its original position and complete the animation.
Steps to reproduce
1. Copy the code below and run using mobileweb in chrome
2. Click on the window, there will be an output message in the console
3. A view should appear and animate but it does not.
4. Repeat using iOS
5. Note the blue square view does appear and animates.
6. Uncomment all commented code
7. Run in mobileweb again
8. The desired effect should occur with the view appearing and completing the animation
CODE:
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
win.open();
win.addEventListener('click', function(){
Ti.API.info('win clicked');
var view = Ti.UI.createView({
height: 50,
width: 50,
backgroundColor: 'blue'
});
win.add(view);
// view.addEventListener('postlayout', function() {
view.animate({
top: 0,
duration: 300
});
// });
});
Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
Closing as will not fix.