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

Request Fullscreen Issue in Desktop Safari #639

Open
2 tasks done
thedivac opened this issue Dec 20, 2023 · 4 comments
Open
2 tasks done

Request Fullscreen Issue in Desktop Safari #639

thedivac opened this issue Dec 20, 2023 · 4 comments

Comments

@thedivac
Copy link

thedivac commented Dec 20, 2023

Describe the bug

I am rendering a long list of content using useWindowVirtualizer.
Each list can be shown in full screen mode by clicking a button using domElement.requestFullscreen().
When I scroll down and request fullscreen on an item that is not rendered initially, the full screen pops up and closes immediately.
I assume this happens because the virtualizer thinks we just scrolled to the top as soon as the full screen is shown, then unmounts the element that we are displaying in full screen (because it's not visible when the list is scrolled to the top) which then closes the full screen again.
See codesandbox for an example. It works in Chrome, but fails in Safari.

Your minimal, reproducible example

https://c9l4ym-5173.csb.app

Steps to reproduce

Open the code sandbox on desktop safari in a new tab, scroll down and click request full screen.

Expected behavior

The element should be shown in full screen.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Desktop Safari

tanstack-virtual version

3.0.1

TypeScript version

No response

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@piecyk
Copy link
Collaborator

piecyk commented Dec 22, 2023

@thedivac could share a link to codesandbox to checkout the implementation

@thedivac
Copy link
Author

thedivac commented Dec 22, 2023

@piecyk
Copy link
Collaborator

piecyk commented Dec 22, 2023

Here you go: https://codesandbox.io/p/devbox/fullscreen-error-in-desktop-safari-c9l4ym

@thedivac looks like a safari bug, we can try to patch it like this https://codesandbox.io/p/devbox/fullscreen-error-in-desktop-safari-forked-zgcnq5?file=%2Fsrc%2Findex.css

@thedivac
Copy link
Author

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

2 participants