Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Screen scrolls up partially on hovering over a sub menu item

SA-55909

Summary



The screen scrolls up partially on hovering over a sub menu item.


Error Messages



Not Applicable


Steps to Reproduce

  1. Configure a screen such that a vertical scrollbar displays.
  2. Configure a button with a navigation multilevel menu (the child menu items should be more such that they cross the entire document). Place this button at the bottom of the screen.
  3. At runtime, click the button to load the menu items and hover on the menu item (which has a huge list). The screen scrolls up.


Root Cause



A defect in Pegasystems’ code or rules: Menu position.


Resolution



As a local-change, include the below code in the UserWorkForm.

<script>
$(document).ready( 
function() { 
if (pega.c && pega.c.menu) { 
var offsettop = $(this).offset().top; 
if (event.top < 0 && offsettop == 0) { 
event.top = 0; 
var scrolltop = $(document).scrollTop(); 
if (scrolltop != 0) { 
var newTop = (scrolltop - offsettop); 
if (($(this).position.top > = 0) && ((scrolltop < offsettop && event.top < 0 && event.top < newTop) || (scrolltop >= offsettop && scrolltop >= event.top ))) { 
event.top = newTop



if (!$(this).hasClass("menu-slider")) { 
var targetEl = ui.target.element.parent(); 
if (targetEl.is("ul") && event.left > 0 && targetEl.get(0).scrollHeight > targetEl.height() + 2) { 
var borderWidth = parseInt(getComputedStyle(targetEl.get(0)).borderLeftWidth) + parseInt(getComputedStyle(targetEl.get(0)).borderRightWidth); 
scrollBarWidth = (targetEl.get(0).offsetWidth - targetEl.get(0).clientWidth) - borderWidth
$(this).css("left", event.left + scrollBarWidth); 
} else { 
$(this).css("left", event.left); 

$(this).css("top", event.top); 
} else { 
$(this).css("left", event.left); 
$(this).css("top", event.top); 





); 
</script>

 
Suggest Edit

Published July 23, 2018 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us