Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10580] MobileWeb: View never appears if animate is called before postlayout finishes

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T18:45:20.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsMobileWeb
Labelscore, supportTeam
ReporterAlexander Miller
AssigneeChris Barber
Created2012-08-23T14:19:47.000+0000
Updated2018-04-04T23:20:28.000+0000

Description

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
		});
	// });
});

Comments

  1. Lee Morris 2017-06-26

    Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
  2. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source