Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resize observer disconnect in sidebar highlighter #7324

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

kulmann
Copy link
Member

@kulmann kulmann commented Jul 25, 2022

Description

ResizeObserver in the sidebar nav highlighter was not set correctly, hence the console error messages when switching to a view without sidebar (see screenshot). Also inverted the early returns into conditional setters, because we always want to reach the code block where we add the beforeDestroy event listener.

Screenshot 2022-07-25 at 11 11 54

Motivation and Context

Keep the browser console clean, correctly terminate resize observer.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs
Copy link

update-docs bot commented Jul 25, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@kulmann kulmann force-pushed the fix-resize-observer-disconnect branch from 64f2a42 to ecb85e2 Compare July 25, 2022 09:24
@kulmann kulmann changed the title Fix resize observer disconnect in sidebar Fix resize observer disconnect in sidebar highlighter Jul 25, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jul 25, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

30.0% 30.0% Coverage
0.0% 0.0% Duplication

@kulmann kulmann self-assigned this Jul 25, 2022
@kulmann kulmann changed the title Fix resize observer disconnect in sidebar highlighter fix: resize observer disconnect in sidebar highlighter Jul 25, 2022
@JammingBen JammingBen merged commit 85e95db into master Jul 26, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix-resize-observer-disconnect branch July 26, 2022 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants