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

remove fullscreen styles when scene gets detached #5602

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

gunhaxxor
Copy link
Contributor

@gunhaxxor gunhaxxor commented Nov 13, 2024

Description:
Removes the fullscreen styles added by aframe when scene is removed/"disconnected" (doDisconnectCallback).
As a-frame adds these styles on adding the scene it should also make sure to clean them up when the scene gets removed.

Detailed explanation:
I use a-frame in an SPA and only some of the pages are using a-frame. On entering a route that uses aframe I load aframe. The a-scene tag will add 'a-fullscreen' class to the documentElement (html tag) that effectively disables scrollbars. This css class should only be present when visiting a route with a (fullscreen) a-scene. Leaving an a-scene route should remove the class. If these styles arent removed other non-vr routes will have no scrollbars, even when the browser would normally render scrollbars.

fixes #5600

@vincentfretin
Copy link
Contributor

This change is welcomed! I had indeed the same issue with using solidjs where I had to remove the class on unmount
https://aframe.wiki/en/#!pages/solidjs.md

@dmarcos
Copy link
Member

dmarcos commented Nov 13, 2024

Thanks so much and congrats on your first contribution! 🥳

@dmarcos dmarcos merged commit 8558316 into aframevr:master Nov 13, 2024
3 checks passed
@gunhaxxor gunhaxxor deleted the patch-2 branch November 14, 2024 08:19
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

Successfully merging this pull request may close these issues.

Aframe doesnt remove the .a-fullscreen class when disconnecting a-scene
3 participants