mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	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.
		
			
				
	
	
		
			14 lines
		
	
	
		
			423 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			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;
 | 
						|
     }
 | 
						|
 
 |