remove fullscreen styles when scene gets detached#5602
Merged
dmarcos merged 1 commit intoaframevr:masterfrom Nov 13, 2024
Merged
remove fullscreen styles when scene gets detached#5602dmarcos merged 1 commit intoaframevr:masterfrom
dmarcos merged 1 commit intoaframevr:masterfrom
Conversation
Contributor
|
This change is welcomed! I had indeed the same issue with using solidjs where I had to remove the class on unmount |
Member
|
Thanks so much and congrats on your first contribution! 🥳 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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