The Wayback Machine - https://web.archive.org/web/20220125063926/https://github.com/dotnet/aspnetcore/issues/39726
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

Blazor server Safari fullscreen issue #39726

Open
1 task done
pinkplus opened this issue Jan 24, 2022 · 3 comments
Open
1 task done

Blazor server Safari fullscreen issue #39726

pinkplus opened this issue Jan 24, 2022 · 3 comments

Comments

@pinkplus
Copy link

@pinkplus pinkplus commented Jan 24, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I'm making a Blazor server app. I'm adding an event handler to enable fullscreen mode, by creating a JS function and calling it via JS interop. It works on Chrome, but it doesn't seem to work on Safari desktop.

I've made a minimal repro project. The JS functions are defined here, and the component is defined here.

Expected Behavior

Fullscreen should be able to be enabled in Blazor server event handler.

Steps To Reproduce

This is the repro repo: https://github.com/pinkplus/SafariFullscreen.

  1. Clone the repo, and run dotnet run.
  2. Open http://localhost:5071 in Safari. You should be able to see two buttons: "Enter fullscreen javascript" and "Enter fullscreen blazor".
  3. Click the "Enter fullscreen javascript" button. You should be in fullscreen mode now. Press ESC to escape fullscreen mode.
  4. Click the "Enter fullscreen blazor" button. Fullscreen mode should be enabled, but it's not.

Exceptions (if any)

No response

.NET Version

6.0.101

Anything else?

I'm using the latest Safari (15.2) on the latest macOS (12.1).

I have a feeling that this may be related to Safari's restriction. Safari may require a user gesture event so that fullscreen can be enabled. With Blazor server, requestFullscreen is probably called in a websocket event handler, so it doesn't work.

@javiercn
Copy link
Contributor

@javiercn javiercn commented Jan 24, 2022

@pinkplus thanks for contacting us.

Does the same functionality work on a static HTML page without Blazor being involved at all?

@msftbot
Copy link
Contributor

@msftbot msftbot bot commented Jan 24, 2022

Hi @pinkplus. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@pinkplus
Copy link
Author

@pinkplus pinkplus commented Jan 25, 2022

@javiercn Yes, it works on a static HTML page. In the repro repo I've included a button using pure javascript as well. You can see it works well with pure javascript.

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

Successfully merging a pull request may close this issue.

None yet
2 participants