@pendo/agent 2.302.2 → 2.302.3

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/dist/dom.esm.js CHANGED
@@ -7359,7 +7359,7 @@ function getScreenPosition(element) {
7359
7359
  };
7360
7360
  }
7361
7361
 
7362
- var VERSION = '2.302.2_';
7362
+ var VERSION = '2.302.3_';
7363
7363
 
7364
7364
  var decodeURIComponent = _.isFunction(window.decodeURIComponent) ? window.decodeURIComponent : _.identity;
7365
7365
 
@@ -3904,8 +3904,8 @@ let SERVER = '';
3904
3904
  let ASSET_HOST = '';
3905
3905
  let ASSET_PATH = '';
3906
3906
  let DESIGNER_SERVER = '';
3907
- let VERSION = '2.302.2_';
3908
- let PACKAGE_VERSION = '2.302.2';
3907
+ let VERSION = '2.302.3_';
3908
+ let PACKAGE_VERSION = '2.302.3';
3909
3909
  let LOADER = 'xhr';
3910
3910
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3911
3911
  /**
@@ -28844,22 +28844,29 @@ var BuildingBlockGuides = (function () {
28844
28844
  const guideContainerId = 'pendo-guide-container';
28845
28845
  const baseContainerId = 'pendo-base';
28846
28846
  const baseContainer = guideToAppend[0];
28847
- const pendoGuideContainer = baseContainer.querySelector(`#${guideContainerId}`);
28847
+ const pendoGuideContainer = dom(`#${guideContainerId}`, baseContainer)[0];
28848
28848
  if (pendoGuideContainer) {
28849
28849
  pendoGuideContainer.id = `${guideContainerId}-${step.id}`;
28850
28850
  baseContainer.id = `${baseContainerId}-${step.id}`;
28851
28851
  }
28852
28852
  const { selector, method } = embedConfig;
28853
28853
  parent = dom(selector)[0];
28854
- if (method === 'replace' && parent) {
28855
- parent.innerHTML = '';
28856
- guideToAppend.appendTo(parent);
28857
- }
28858
- else if (method === 'prepend') {
28859
- guideToAppend.prependTo(parent);
28854
+ const existingGuideElement = dom(`#${baseContainer.id}`, parent);
28855
+ if (existingGuideElement.length) { // The embedded guide may already exist due to page caching
28856
+ guideToAppend = existingGuideElement;
28857
+ step.guideElement = guideToAppend;
28860
28858
  }
28861
28859
  else {
28862
- guideToAppend.appendTo(parent);
28860
+ if (method === 'replace' && parent) {
28861
+ parent.innerHTML = '';
28862
+ guideToAppend.appendTo(parent);
28863
+ }
28864
+ else if (method === 'prepend') {
28865
+ guideToAppend.prependTo(parent);
28866
+ }
28867
+ else {
28868
+ guideToAppend.appendTo(parent);
28869
+ }
28863
28870
  }
28864
28871
  }
28865
28872
  else {