@seeqdev/qomponents 0.0.76 → 0.0.78

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.js CHANGED
@@ -6496,6 +6496,10 @@ const HTMLTip = ({ text }) => {
6496
6496
  dangerouslySetInnerHTML: { __html: DOMPurify.sanitize(text) },
6497
6497
  });
6498
6498
  };
6499
+ /** Tooltips can cause SystemTests to be flaky, so we suppress them in Playwright and Protractor */
6500
+ const suppressTooltip = () => {
6501
+ return window.navigator.userAgent === 'Playwright' || window.navigator.userAgent.includes('Protractor');
6502
+ };
6499
6503
  /**
6500
6504
  * QTip
6501
6505
  *
@@ -6542,9 +6546,9 @@ const QTip = () => {
6542
6546
  }
6543
6547
  }, 300, show);
6544
6548
  React.useEffect(() => {
6545
- document.body.addEventListener('mousemove', onMouseMove);
6549
+ !suppressTooltip() && document.body.addEventListener('mousemove', onMouseMove);
6546
6550
  return () => {
6547
- document.removeEventListener('mousemove', onMouseMove);
6551
+ !suppressTooltip() && document.removeEventListener('mousemove', onMouseMove);
6548
6552
  };
6549
6553
  }, []);
6550
6554
  const ttTimeout = React.useRef();