@salesforcedevs/docs-components 1.34.4-scroll-1 → 1.34.4-scroll-2
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
|
@@ -501,12 +501,12 @@ export default class ContentLayout extends LightningElement {
|
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
/**
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
*/
|
|
504
|
+
* Completes the one-shot if no hash exists or scrolling succeeds,
|
|
505
|
+
* retrying only when the target isn't available yet to prevent
|
|
506
|
+
* unexpected scrolls on observer re-attach. */
|
|
507
507
|
// eslint-disable-next-line no-undef
|
|
508
508
|
protected tryScrollToHash(headingElements: NodeListOf<Element>): void {
|
|
509
|
-
if (this.scrollToHash(headingElements)) {
|
|
509
|
+
if (!window.location.hash || this.scrollToHash(headingElements)) {
|
|
510
510
|
this.didScrollToSelectedHash = true;
|
|
511
511
|
}
|
|
512
512
|
}
|