@salesforcedevs/docs-components 1.3.345-refactor-tab-alpha1 → 1.3.345-refactor-tab-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -143,6 +143,20 @@ export default class LwcContentLayout extends ContentLayout {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
renderedCallback(): void {
|
|
146
|
+
/**
|
|
147
|
+
* Note: We are adding timeout because chrome is optimizing and not triggering recent renderedCallback though elements reference is changed
|
|
148
|
+
* Also we are considering recent renderedCallback
|
|
149
|
+
*/
|
|
150
|
+
this.clearRenderObserverTimer();
|
|
151
|
+
this.observerTimerId = setTimeout(
|
|
152
|
+
this.attachInteractionObserver,
|
|
153
|
+
OBSERVER_ATTACH_WAIT_TIME
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
this.adjustNavPosition();
|
|
157
|
+
window.addEventListener("scroll", this.adjustNavPosition);
|
|
158
|
+
window.addEventListener("resize", this.adjustNavPosition);
|
|
159
|
+
|
|
146
160
|
if (!this.hasRendered) {
|
|
147
161
|
this.hasRendered = true;
|
|
148
162
|
this.setRNBByTab();
|
|
@@ -162,6 +176,14 @@ export default class LwcContentLayout extends ContentLayout {
|
|
|
162
176
|
}
|
|
163
177
|
|
|
164
178
|
disconnectedCallback(): void {
|
|
179
|
+
this.disconnectObserver();
|
|
180
|
+
window.removeEventListener(
|
|
181
|
+
"highlightedtermchange",
|
|
182
|
+
this.updateHighlighted
|
|
183
|
+
);
|
|
184
|
+
window.removeEventListener("scroll", this.adjustNavPosition);
|
|
185
|
+
window.removeEventListener("resize", this.adjustNavPosition);
|
|
186
|
+
|
|
165
187
|
if (this.showTabBasedRNB) {
|
|
166
188
|
window.removeEventListener("tabchanged", this.onTabChanged);
|
|
167
189
|
window.removeEventListener(
|
|
@@ -173,6 +195,10 @@ export default class LwcContentLayout extends ContentLayout {
|
|
|
173
195
|
);
|
|
174
196
|
window.removeEventListener("popstate", this.handlePopState);
|
|
175
197
|
}
|
|
198
|
+
this.searchSyncer.dispose();
|
|
199
|
+
this.clearRenderObserverTimer();
|
|
200
|
+
|
|
201
|
+
window.clearInterval(this._scrollInterval);
|
|
176
202
|
}
|
|
177
203
|
|
|
178
204
|
attachInteractionObserver = (): void => {
|