Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Display: None applied Canvas only for iOS, no models show #2715

Closed
phil-kt opened this issue Jan 17, 2023 · 4 comments
Closed

Display: None applied Canvas only for iOS, no models show #2715

phil-kt opened this issue Jan 17, 2023 · 4 comments

Comments

@phil-kt
Copy link

phil-kt commented Jan 17, 2023

Similar issues as reported before (#2532) but I just tried viewing my new portfolio on Safari for iOS, and for some reason the Canvas element has display:none applied through javascript styling, only when I open it on Safari my phone. When using Safari on Mac the webapp renders just fine.

you can see my website live at http://philkt.netlify.app and the code here

I have no idea how to repro this or why it seems to be only applied on iOS? It displays fine on Chrome in Android and am not doing any real customized css or code on the Canvas element.

Safari on iOS Inspector
Screenshot 2023-01-16 at 10 01 53 PM

Safari on Mac Inspector
Screenshot 2023-01-16 at 10 01 44 PM

@drcmda
Copy link
Member

drcmda commented Jan 17, 2023

it doesn't come from us 🤷‍♂️ it must be some kind of extension. i can open any threejs site in safari just fine, mobile and desktop, and no known issues with that. the issue you linked isn't ios/safari, that was user error on react-native + fiber.

@phil-kt
Copy link
Author

phil-kt commented Jan 19, 2023

@drcmda I dug into this a bit, trying to create a repro. For now I've figured out that the canvas is never rendering/loading in and that's why my canvas has display none, I just see my Suspense fallback display. Similar to this (#2546) except it appears to happen on real iPhones too, not just simulators.

(sorry for closing/reopening, got confused with the comment UI)

@phil-kt phil-kt closed this as completed Jan 19, 2023
@phil-kt phil-kt reopened this Jan 19, 2023
@drcmda
Copy link
Member

drcmda commented Jan 19, 2023

that issue again is react-native. im not sure now, do you struggle with the dom, or react-native and expo? it looks to me your model does not load, wrong path or something like that.

@CodyJasonBennett
Copy link
Member

#2546 is a bug in XCode/Apple OpenGL where the emulator will not push frames; that has to do with the WebGL implementation used in react-native and can't be reproduced on web. We have to maintain that in our spare time so it's not as flushed out as a real browser implementation.

This I'd try to isolate by iteratively removing things from the page until you just have the canvas and any other problematic elements. The only thing unclear for me when reading through the source is the use of [hidden] { display: none } and whether that's interfering with suspense in react-dom (sometimes react will toggle elements' visibility while it waits for suspense to resolve). Otherwise, I know I've had layout issues in early versions of MacOS Monterey with display: flex; flex-direction: grid which was fixed with display: grid;, but that would cause things to incorrectly stretch or expand and not affect its page visibility.

@pmndrs pmndrs locked and limited conversation to collaborators Jan 21, 2023
@CodyJasonBennett CodyJasonBennett converted this issue into discussion #2727 Jan 21, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants