Support Article
Menu list displays when cursor moves outside link area
Summary
A Link control is configured with an action to display the menu on hover. The menu is displays on mouse hover, however when the cursor moves outside the link area, the menu continues to display. The menu must not display when the cursor moves outside the link area.
Error Messages
Not Applicable
Steps to Reproduce
- Create a Link control in a section.
- Switch to Actions tab for the control.
- Add an action set for the hover event to open the menu.
- Save and select Actions > Preview. When hovering over a link, the menu displays, however, the menu continues to display when cursor is moved out of the link area.
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
Perform the following local-change:
- In the Action tab of the Link, invoke the removeMenu Run script.
- In UserWorkForm, add the below code and Save the rule.
<script>
function removeMenu(){
var menuDiv = $(".menu-panel-wrapper");
menuDiv.wrap("<div class = 'remove' onmouseleave='removeMenuFinal(event)'></div>");
}
function removeMenuFinal(event){
var target = event.target;
var menuDiv = target.querySelector(".menu-panel-wrapper");
$(menuDiv).hide();
$(menuDiv).unwrap();
}
</script>
Published October 9, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.