@salesforcedevs/docs-components
Advanced tools
Comparing version 1.3.345-refactor-tab-alpha1 to 1.3.345-refactor-tab-alpha2
{ | ||
"name": "@salesforcedevs/docs-components", | ||
"version": "1.3.345-refactor-tab-alpha1", | ||
"version": "1.3.345-refactor-tab-alpha2", | ||
"description": "Docs Lightning web components for DSC", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -146,2 +146,16 @@ import ContentLayout from "doc/contentLayout"; | ||
renderedCallback(): void { | ||
/** | ||
* Note: We are adding timeout because chrome is optimizing and not triggering recent renderedCallback though elements reference is changed | ||
* Also we are considering recent renderedCallback | ||
*/ | ||
this.clearRenderObserverTimer(); | ||
this.observerTimerId = setTimeout( | ||
this.attachInteractionObserver, | ||
OBSERVER_ATTACH_WAIT_TIME | ||
); | ||
this.adjustNavPosition(); | ||
window.addEventListener("scroll", this.adjustNavPosition); | ||
window.addEventListener("resize", this.adjustNavPosition); | ||
if (!this.hasRendered) { | ||
@@ -166,2 +180,10 @@ this.hasRendered = true; | ||
disconnectedCallback(): void { | ||
this.disconnectObserver(); | ||
window.removeEventListener( | ||
"highlightedtermchange", | ||
this.updateHighlighted | ||
); | ||
window.removeEventListener("scroll", this.adjustNavPosition); | ||
window.removeEventListener("resize", this.adjustNavPosition); | ||
if (this.showTabBasedRNB) { | ||
@@ -178,2 +200,6 @@ window.removeEventListener("tabchanged", this.onTabChanged); | ||
} | ||
this.searchSyncer.dispose(); | ||
this.clearRenderObserverTimer(); | ||
window.clearInterval(this._scrollInterval); | ||
} | ||
@@ -180,0 +206,0 @@ |
278988
6944