Skip to content

Pausing a player in the same tick doesn't work in chrome. #267

Closed
@cibernox

Description

@cibernox

Not sure if it's a chrome bug or a bug in the library. Seems suspicious to me that only fails in the only browser that does a fallback to the native implementation.

var animation = new Animation(menu, [{transform: "translate(-320px)"}, {transform: "translate(-320px)"}], 2000);
var player = document.timeline.play(animation);
player.pause();

The animation starts anyway.

A bad workaround is to wait until the next tick

setTimeout(player.pause, 1);

but the first frame of the animation still runs.

Tested in chrome 40.0.2214.69 beta (64-bit) OSX and Chrome for Android 39.
It works in Safari and Firefox. No idea about IE.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions