@whitesev/pops 1.2.0 → 1.2.2

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.
@@ -8967,11 +8967,13 @@ System.register('pops', [], (function (exports) {
8967
8967
  popsDOMUtils.on(globalThis, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
8968
8968
  capture: true,
8969
8969
  });
8970
- const $shadowRoot = config.target.getRootNode();
8971
- if ($shadowRoot instanceof ShadowRoot) {
8972
- popsDOMUtils.on($shadowRoot, "click touchstart", void 0, PopsContextMenu.shadowRootCheckClickEvent, {
8973
- capture: true,
8974
- });
8970
+ if (config.target instanceof Node) {
8971
+ const $shadowRoot = config.target.getRootNode();
8972
+ if ($shadowRoot instanceof ShadowRoot) {
8973
+ popsDOMUtils.on($shadowRoot, "click touchstart", void 0, PopsContextMenu.shadowRootCheckClickEvent, {
8974
+ capture: true,
8975
+ });
8976
+ }
8975
8977
  }
8976
8978
  },
8977
8979
  /**
@@ -8981,11 +8983,13 @@ System.register('pops', [], (function (exports) {
8981
8983
  popsDOMUtils.off(globalThis, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
8982
8984
  capture: true,
8983
8985
  });
8984
- const $shadowRoot = config.target.getRootNode();
8985
- if ($shadowRoot instanceof ShadowRoot) {
8986
- popsDOMUtils.off($shadowRoot, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
8987
- capture: true,
8988
- });
8986
+ if (config.target instanceof Node) {
8987
+ const $shadowRoot = config.target.getRootNode();
8988
+ if ($shadowRoot instanceof ShadowRoot) {
8989
+ popsDOMUtils.off($shadowRoot, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
8990
+ capture: true,
8991
+ });
8992
+ }
8989
8993
  }
8990
8994
  },
8991
8995
  /**