Files
zulip/patches/tippy.js@6.3.7.patch
Aman Agrawal 2b33a5af83 tippy: Add patch to avoid text Node as target in Firefox.
In Firefox, event targets can be pseudo elements like text
nodes which don't have .closest method. This results in error
when delegate tries to handle trigger for a text node target.

Since https://github.com/atomiks/tippyjs/pull/1166 has no
response from the developer, we decided to apply this patch
ourselves.
2024-07-05 10:15:45 -07:00

14 lines
423 B
Diff

diff --git a/dist/tippy.esm.js b/dist/tippy.esm.js
index 55346f57874b0af79fec3b6f9f0253f9d55bfee2..c7a4e1549dcc3e1815c908825d914d44467e60f3 100644
--- a/dist/tippy.esm.js
+++ b/dist/tippy.esm.js
@@ -1907,7 +1907,7 @@
var normalizedReturnValue = normalizeToArray(returnValue);
function onTrigger(event) {
- if (!event.target || disabled) {
+ if (!isElement(event.target) || disabled) {
return;
}