@salesforcedevs/docs-components 1.3.194-reference-scroll1 → 1.3.194-reference-scroll2
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
|
@@ -88,10 +88,10 @@ export default class AmfTopic extends LightningElement {
|
|
|
88
88
|
}
|
|
89
89
|
container?.appendChild(element as Node);
|
|
90
90
|
|
|
91
|
-
this.scrollToTop(container)
|
|
91
|
+
this.scrollToTop(container);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
scrollToTop(container:
|
|
94
|
+
scrollToTop(container: Element) {
|
|
95
95
|
const isTabletOrDesktop = window.matchMedia(
|
|
96
96
|
`(min-width: ${TABLE_SIZE_MATCH})`
|
|
97
97
|
).matches;
|
|
@@ -100,8 +100,8 @@ export default class AmfTopic extends LightningElement {
|
|
|
100
100
|
if (isTabletOrDesktop) {
|
|
101
101
|
// Sync with the browser to account for any reflows that may have happened
|
|
102
102
|
requestAnimationFrame(() => {
|
|
103
|
-
container?.scrollIntoView(true)
|
|
104
|
-
})
|
|
103
|
+
container?.scrollIntoView(true);
|
|
104
|
+
});
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|