mirror of https://github.com/jenkinsci/jenkins.git
				
				
				
			[JENKINS-75927] remove model-link--open onHide (#10931)
[JENKINS75927] remove model-link--open onHide
When a model-link is opened the link gets added a class that highlights
the link. Upon closing the menu (e.g. when clicking outside) the menu
disappears but the added class is not removed.
(cherry picked from commit aa1564ea4d)
			
			
This commit is contained in:
		
							parent
							
								
									00922a10bc
								
							
						
					
					
						commit
						b54bd9670b
					
				|  | @ -57,10 +57,6 @@ function dropdown() { | |||
|         referenceParent.classList.add("model-link--open"); | ||||
|       } | ||||
|     }, | ||||
|     onHide: (instance) => { | ||||
|       const referenceParent = instance.reference.parentNode; | ||||
|       referenceParent.classList.remove("model-link--open"); | ||||
|     }, | ||||
|   }; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -52,6 +52,8 @@ function generateDropdown(element, callback, immediate, options = {}) { | |||
|           } | ||||
|         }, | ||||
|         onHide(instance) { | ||||
|           const referenceParent = instance.reference.parentNode; | ||||
|           referenceParent.classList.remove("model-link--open"); | ||||
|           if ( | ||||
|             instance.props.trigger === "mouseenter" && | ||||
|             !instance.clickToHide | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue