-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
This issue is created from the PR Review.
The code at issue is:
if (width == screen.width && height == screen.height) {
Browser.requestFullscreen();
} else { // ...When the calling code calls GLFW.setWindowSize and provides width and height to be the screen width and height, it ends up calling Browser.requestFullscreen. Unfortunately, this raises this error: Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.
When Browser.requestFullscreen is called when a user clicks on a button (for example in the default shell), this works. But when it is called directly it fails.
As requested in the PR, I am reverting the changes I made in the PR and I create a separate issue for it.
I will then make another PR for this problem only, which should also allow me to write a test unique to this error.
Of note: there is another piece of code that does a similar call on window creation and I bet it triggers the same issue. I will also add a test for it.