atomiks / tippyjs

Tooltip, popover, dropdown, and menu library
https://atomiks.github.io/tippyjs/
MIT License
11.86k stars 519 forks source link

RequireJS incompatibility? #1077

Open BenPortner opened 1 year ago

BenPortner commented 1 year ago

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/

Atharv-Nalwade commented 1 year ago

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