tippyjs icon indicating copy to clipboard operation
tippyjs copied to clipboard

RequireJS incompatibility?

Open BenPortner opened this issue 1 year ago • 1 comments

Bug description

Tippy breaks (Uncaught ReferenceError: tippy is not defined) when including it after require.js via script tag. It works when including it before.

Reproduction

<!DOCTYPE html>
<html>

<head>
  <script src="https://unpkg.com/@popperjs/core@2"></script>
  <!-- <script src="https://unpkg.com/tippy.js@6"></script> --> <!-- this works -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
  <script src="https://unpkg.com/tippy.js@6"></script> <!-- this does not work -->
  <script>
    document.addEventListener("DOMContentLoaded", function (event) {
      tippy('[data-tippy-content]');
    });
  </script>

</head>

<body>
  <svg>
    <text x=10, y=10 data-tippy-content="test">some text</text>
  </svg>
</body>

</html>

JSFiddle here: https://jsfiddle.net/BenPortner/1mnewspL/

BenPortner avatar Aug 31 '22 13:08 BenPortner

Hey, I think I have found a solution to the problem can you assign me this issue?

And can you let me know the general process/flow of contributing to this project

Atharv-Nalwade avatar Jun 05 '23 14:06 Atharv-Nalwade