@douyinfe/semi-ui 2.10.0 → 2.10.1

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.
@@ -29195,6 +29195,12 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
29195
29195
  }
29196
29196
  };
29197
29197
 
29198
+ this.handlePortalMouseDown = e => {
29199
+ if (this.props.stopPropagation) {
29200
+ Object(_utils["g" /* stopPropagation */])(e);
29201
+ }
29202
+ };
29203
+
29198
29204
  this.handlePortalInnerKeyDown = e => {
29199
29205
  this.foundation.handleContainerKeydown(e);
29200
29206
  };
@@ -29282,6 +29288,7 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
29282
29288
  style: portalInnerStyle,
29283
29289
  ref: this.setContainerEl,
29284
29290
  onClick: this.handlePortalInnerClick,
29291
+ onMouseDown: this.handlePortalMouseDown,
29285
29292
  onKeyDown: this.handlePortalInnerKeyDown
29286
29293
  }, inner));
29287
29294
  };
@@ -29514,15 +29521,11 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
29514
29521
  }
29515
29522
  };
29516
29523
 
29517
- document.addEventListener('mousedown', this.clickOutsideHandler, {
29518
- capture: true
29519
- });
29524
+ window.addEventListener('mousedown', this.clickOutsideHandler);
29520
29525
  },
29521
29526
  unregisterClickOutsideHandler: () => {
29522
29527
  if (this.clickOutsideHandler) {
29523
- document.removeEventListener('mousedown', this.clickOutsideHandler, {
29524
- capture: true
29525
- });
29528
+ window.removeEventListener('mousedown', this.clickOutsideHandler);
29526
29529
  this.clickOutsideHandler = null;
29527
29530
  }
29528
29531
  },