Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS standby issue #2

Open
kanongil opened this issue Feb 12, 2018 · 0 comments
Open

iOS standby issue #2

kanongil opened this issue Feb 12, 2018 · 0 comments

Comments

@kanongil
Copy link

It turns out that iOS devices does not always advance the performance.now() during standby. This causes the computed event time to occur after the current performance.now() time.

In this case, I have fixed it by computing an additional systemStandbyOffset, which is added to the returned highResClockOffset in getTimebaseOffset().

Note that this issue is complicated by the fact that touch events apparently has a timestamp that is based on performance.timing.navigationStart + performance.now(), while a click event is a plain Date.now(). Ie. the logic need to handle these two timebases being mixed together.

My testing has been done in an UIWebView on an iOS 11.2.5 device.

See https://stackoverflow.com/questions/26177087/ios-8-mobile-safari-wrong-timestamp-on-touch-events for a bit of reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant