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