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

The screen shifts left on selecting a drop down or entering text

SA-43104

Summary



When selecting a drop down or a text field, the screen focus shifts to the left by default.


Error Messages

Not Applicable


Steps to Reproduce

1. Scroll to the extreme right of the screen
2. Enter text in the text field or select a drop down



Root Cause

The screen focus shifts to the form or iframe document.


Resolution

Perform the following local-change:

Include the below script in the UserworkForm.


<script>

$(document).ready(function(){
$("body").change(function(e) {
debugger;
if(document.body.scrollWidth > document.body.clientWidth) {
debugger;
var scrollLeft = document.body.scrollLeft;
if(pega.util.Event.isIE){
scrollLeft = document.documentElement.scrollLeft
}
setTimeout(function() {
document.body.scrollLeft = scrollLeft;
if(pega.util.Event.isIE){
document.documentElement.scrollLeft = scrollLeft;
}
}, 100);
}
});

$("body").click(function(e) {
if($("#Pega_Cal_Cont").get(0)) {
if($.contains($("#Pega_Cal_Cont").get(0), e.target)) {
var scrollLeft = document.body.scrollLeft;
if(pega.util.Event.isIE){
scrollLeft = document.documentElement.scrollLeft
}

if(scrollLeft > document.body.clientWidth) {
debugger;
//scrollLeft = document.body.scrollLeft;
setTimeout(function() {
document.body.scrollLeft = scrollLeft;
if(pega.util.Event.isIE){
document.documentElement.scrollLeft = scrollLeft;
}
}, 100);
}
}
}
});
});
</script>



Suggest Edit

Published September 24, 2017 - 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