This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Added VisibilityHandler to handle the mounting and unmounting of child components of App when changing panel tabs.#5688
Merged
jasonLaster merged 2 commits intoMar 16, 2018
Conversation
…d components of App when changing panel tabs.
jasonLaster
pushed a commit
that referenced
this pull request
Mar 21, 2018
…d components of App when changing panel tabs. (#5688)
jasonLaster
added a commit
to jasonLaster/debugger.html
that referenced
this pull request
Apr 19, 2018
… of child components of App when changing panel tabs. (firefox-devtools#5688)" This reverts commit ea6e740.
jasonLaster
added a commit
to jasonLaster/debugger.html
that referenced
this pull request
Apr 20, 2018
… of child components of App when changing panel tabs. (firefox-devtools#5688)" (firefox-devtools#6030) This reverts commit ea6e740.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Added VisibilityHandler to handle the mounting and unmounting of child components of App when changing panel tabs.
Fixes Issue: #4852 -- Does not address the scrolling issue directly. The fix will unmount the child components of App when the visibility of the tab is hidden, and mount the components of App when the tab is visible. Therefore the previous position in the editor is ignored, and is reloaded to the top of the editor.
Summary of Changes
Addition of the VisibilityHandler from here. (With a slight modification to only render the children when the tab is visible.)
Wrap the contents of the App component in the modified VisibilityHandler.
Screenshots/Videos
Before:

After:

Just showing how the editor is reloaded, loses the scroll position, and is reloaded at the top of the document.