mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Make emoji picker close automatically if input parent element is destroyed
This commit is contained in:
		
							
								
								
									
										14
									
								
								assets/3rdparty/wdt-emoji/wdt-emoji-bundle.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								assets/3rdparty/wdt-emoji/wdt-emoji-bundle.js
									
									
									
									
										vendored
									
									
								
							@@ -289,6 +289,20 @@
 | 
			
		||||
 | 
			
		||||
    addClass(this, 'wdt-emoji-picker-open');
 | 
			
		||||
    //this.innerHTML = wdtEmojiBundle.emoji.replace_colons(':sunglasses:'); //COMUNIC - EDIT
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    //COMUNIC EDIT
 | 
			
		||||
    //Make the picker close automatically if the parent element is removed
 | 
			
		||||
    var interval = setInterval(function(){
 | 
			
		||||
      if(!parent.isConnected){
 | 
			
		||||
        wdtEmojiBundle.close();
 | 
			
		||||
        clearInterval(interval);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
    }, 2500);
 | 
			
		||||
    //END COMUNIC EDIT
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user