@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.252-dc1-alpha",
3
+ "version": "1.3.262-scroll-alpha1",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -1,6 +1,7 @@
1
1
  doc-phase {
2
2
  --doc-c-phase-top: calc(
3
- var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
3
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height) +
4
+ var(--dx-g-spacing-xl)
4
5
  );
5
6
  }
6
7
 
@@ -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
- this.scrollToTop(container);
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 {