Skip to content
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 into
firefox-devtools:masterfrom
mmcote:4852switchTabScroll03
Mar 16, 2018
Merged

Added VisibilityHandler to handle the mounting and unmounting of child components of App when changing panel tabs.#5688
jasonLaster merged 2 commits into
firefox-devtools:masterfrom
mmcote:4852switchTabScroll03

Conversation

@mmcote

@mmcote mmcote commented Mar 15, 2018

Copy link
Copy Markdown
Contributor

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:
beforefixjumping

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

@jasonLaster jasonLaster merged commit ea6e740 into firefox-devtools:master Mar 16, 2018
jasonLaster pushed a commit that referenced this pull request Mar 21, 2018
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.
darkwing pushed a commit that referenced this pull request Apr 20, 2018
… of child components of App when changing panel tabs. (#5688)" (#6030)

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants