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

Returning native promise #167

Closed
stormtrooper1859 opened this issue Jan 30, 2020 · 1 comment · Fixed by #168
Closed

Returning native promise #167

stormtrooper1859 opened this issue Jan 30, 2020 · 1 comment · Fixed by #168

Comments

@stormtrooper1859
Copy link
Contributor

Latest version of Chrome blocked information about fullscreen activation if it's happened in iframe and 'fullscreenchange' event won't fired. Link from SO. So promise, which returned from 'exit' function doesn't resolve.
But document.exitFullscreen() returns native promise, which normally resolves.
What do you think about it?

You can repeat it by using youtube embedded video and calling functions from console.
I repeated it with Chrome 79 on macOS 10.14

@sindresorhus
Copy link
Owner

We still have to support the old way, but there could be a check to see if document.exitFullscreen() returns a promise and then use that directly instead of the events.

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

Successfully merging a pull request may close this issue.

2 participants