@salesforcedevs/docs-components 1.3.252-dc1-alpha → 1.3.262-scroll-alpha1
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
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
import type { TopicModel } from "./types";
|
|
11
11
|
import { Json } from "typings/custom";
|
|
12
12
|
|
|
13
|
-
const TABLE_SIZE_MATCH = "769px";
|
|
14
|
-
|
|
15
13
|
export default class AmfTopic extends LightningElement {
|
|
16
14
|
private _model: TopicModel | undefined;
|
|
17
15
|
private amf: Json;
|
|
@@ -88,21 +86,7 @@ export default class AmfTopic extends LightningElement {
|
|
|
88
86
|
}
|
|
89
87
|
container?.appendChild(element as Node);
|
|
90
88
|
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
scrollToTop(container: Element) {
|
|
95
|
-
const isTabletOrDesktop = window.matchMedia(
|
|
96
|
-
`(min-width: ${TABLE_SIZE_MATCH})`
|
|
97
|
-
).matches;
|
|
98
|
-
|
|
99
|
-
// We need to scroll to top from the tablet size as side nav bar and content in side by side from tablet size
|
|
100
|
-
if (isTabletOrDesktop) {
|
|
101
|
-
// Sync with the browser to account for any reflows that may have happened
|
|
102
|
-
requestAnimationFrame(() => {
|
|
103
|
-
container?.scrollIntoView(true);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
89
|
+
window.scrollTo(0, 0);
|
|
106
90
|
}
|
|
107
91
|
|
|
108
92
|
renderedCallback(): void {
|