remove fullscreen styles when scene gets detached #5602
Merged
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