@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.194-reference-scroll1",
3
+ "version": "1.3.194-reference-scroll2",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -14,7 +14,6 @@
14
14
  .topic-container {
15
15
  scroll-margin-top: calc(
16
16
  var(--dx-g-global-header-height) + var(--dx-g-doc-header-height) +
17
- var(--dx-g-doc-header-height) +
18
17
  var(--reference-container-margin-top) +
19
18
  var(--api-documentation-margin-top)
20
19
  );
@@ -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: HTMLElement) {
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