Skip to content

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

3 participants