@salesforcedevs/dx-components 1.40.7 → 1.40.8

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/dx-components",
3
- "version": "1.40.7",
3
+ "version": "1.40.8",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -44,5 +44,5 @@
44
44
  "luxon": "3.4.4",
45
45
  "msw": "^2.12.4"
46
46
  },
47
- "gitHead": "1df35017c1cc93551081329c96a37f42ed0780af"
47
+ "gitHead": "e27db400e07f99b4ff4afe048366a0cf152f3c4d"
48
48
  }
@@ -87,6 +87,12 @@ export default class CodeBlock extends LightningElement {
87
87
  this._codeBlock = value.trim();
88
88
  }
89
89
 
90
+ /** True once the highlighted code has been rendered into the DOM. */
91
+ @api
92
+ get rendered(): boolean {
93
+ return this._codeBlockRendered;
94
+ }
95
+
90
96
  @api
91
97
  get showLoadingIndicator() {
92
98
  return this._showLoadingIndicator;
@@ -155,7 +155,12 @@ export abstract class HeaderBase extends LightningElement {
155
155
  setTimeout(() => {
156
156
  const id = hash.replace("#", "");
157
157
  const element = document.getElementById(id);
158
- if (element && element.scrollIntoView) {
158
+ // doc-heading targets are scrolled by doc-content-layout once the page has rendered
159
+ if (
160
+ element &&
161
+ element.tagName !== "DOC-HEADING" &&
162
+ element.scrollIntoView
163
+ ) {
159
164
  element.scrollIntoView();
160
165
  }
161
166
  }, 0);