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

Uncaught (in promise) TypeError: fullscreen error #219

Open
nicky132 opened this issue Nov 26, 2022 · 3 comments
Open

Uncaught (in promise) TypeError: fullscreen error #219

nicky132 opened this issue Nov 26, 2022 · 3 comments

Comments

@nicky132
Copy link

image

image

Hope someone solve this problem.
I want to open page fullscreen automatically, when i jump to the new page with window.location.href.

@brandonk1234
Copy link

brandonk1234 commented Dec 12, 2022

Hi @nicky132 ,

Could you possibly try wrapping your function call in a conditions like this.

if (screenfull.isEnabled) {
    screenfull.toggle();
}

This seemed to fix my problem.

@hbatalhaStch
Copy link

Hi @nicky132 ,

Could you possibly try wrapping your function call in a conditions like this.

if (screenfull.isEnabled) {
    screenfull.toggle();
}

This seemed to fix my problem.

I tried this but I am still getting the error.
The strange thing is that despite the error it still goes into fullscreen mode

@clinton9ice
Copy link

clinton9ice commented Mar 24, 2023

Could you try using
if (screenfull.isEnabled) { screenfull?.toggle(); }
It worked for me. it either executes when available or returns undefined.

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

4 participants