{"action":"closed","issue":{"url":"https://api.github.com/repos/w3c/web-animations/issues/165","repository_url":"https://api.github.com/repos/w3c/web-animations","labels_url":"https://api.github.com/repos/w3c/web-animations/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/w3c/web-animations/issues/165/comments","events_url":"https://api.github.com/repos/w3c/web-animations/issues/165/events","html_url":"https://github.com/w3c/web-animations/issues/165","id":171562799,"number":165,"title":"currentTime does not stick when set beyond the target end using a negative playback rate","user":{"login":"birtles","id":1232595,"avatar_url":"https://avatars.githubusercontent.com/u/1232595?v=3","gravatar_id":"","url":"https://api.github.com/users/birtles","html_url":"https://github.com/birtles","followers_url":"https://api.github.com/users/birtles/followers","following_url":"https://api.github.com/users/birtles/following{/other_user}","gists_url":"https://api.github.com/users/birtles/gists{/gist_id}","starred_url":"https://api.github.com/users/birtles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/birtles/subscriptions","organizations_url":"https://api.github.com/users/birtles/orgs","repos_url":"https://api.github.com/users/birtles/repos","events_url":"https://api.github.com/users/birtles/events{/privacy}","received_events_url":"https://api.github.com/users/birtles/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-17T02:51:42Z","updated_at":"2016-08-18T07:02:15Z","closed_at":"2016-08-18T07:02:15Z","body":"Given the test case: https://jsfiddle.net/vcy8y52v/\r\n\r\nFirefox produces the following output:\r\n\r\n```\r\nFor a 1s animation:\r\nCurrent time at start: 0.002s\r\nCurrent time after waiting a frame: 0.019s\r\nCurrent time after seeking to 2s: 2s\r\nCurrent time after waiting a frame: 2s\r\nCurrent time after setting playbackRate to -1: 2s\r\nCurrent time after waiting a frame: 1.983s\r\nCurrent time after seeking to 2s: -1s\r\nCurrent time after waiting a frame: 0s\r\n```\r\n\r\nNotice that the current time jumps from -1s to 0s at the end for no apparent reason. This is correct according to the spec, because the [updating the finished procedure](https://w3c.github.io/web-animations/#updating-the-finished-state) has:\r\n\r\n> **If animation playback rate < 0 and current time is resolved and less than or equal to 0,**\r\n> If did seek is true, let the hold time be the value of current time.\r\n> If did seek is false, let the hold time be zero.\r\n\r\nThat is, it resets the fold time to zero when 'did seek' is false.\r\n\r\nFor the forwards, direction, however it has:\r\n\r\n> **If animation playback rate > 0 and current time is resolved and greater than or equal to target effect end,**\r\n> If did seek is true, let the hold time be the value of current time.\r\n> If did seek is false, let the hold time be the maximum value of previous current time and target effect end. If the previous current time is unresolved, let the hold time be target effect end.\r\n\r\ni.e. it uses the 'previous current time' to keep the position beyond the end of the target effect end."}}
{"actor":{"display_login":"birtles"}}