Skip to content

Commit aa1564e

Browse files
authored
[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.
1 parent a8ae2fa commit aa1564e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/js/components/dropdowns/templates.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ function dropdown() {
5757
referenceParent.classList.add("model-link--open");
5858
}
5959
},
60-
onHide: (instance) => {
61-
const referenceParent = instance.reference.parentNode;
62-
referenceParent.classList.remove("model-link--open");
63-
},
6460
};
6561
}
6662

src/main/js/components/dropdowns/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ function generateDropdown(element, callback, immediate, options = {}) {
5252
}
5353
},
5454
onHide(instance) {
55+
const referenceParent = instance.reference.parentNode;
56+
referenceParent.classList.remove("model-link--open");
5557
if (
5658
instance.props.trigger === "mouseenter" &&
5759
!instance.clickToHide

0 commit comments

Comments
 (0)