Question


DXC Technology
CR
Last activity: 19 Apr 2019 2:07 EDT
Focus on top of the page
Good afternoon,
I have a problem, when I pass to a new stage the focus and scroll is on bottom of the page.
I want the focus and scroll on the top of the page,
who have a way to fix this?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
US
Hi,
There are few reasons why screen scrolls to the bottom:
- first editable field in the page is at the bottom
- if there is pagination control for a grid that happens to be at the end of the page
- (or) a different configuration issue
Thought of sharing couple of posts on this topic which solved the issue:
- https://community1.pega.com/community/product-support/question/how-focus-top-page-screen
- https://collaborate.pega.com/question/screen-focus-not-starting-top-page
First post has JS/jquery way to handle the scroll.
Second post suggests adding hidden control to the top of the page.
Hope this helps!
-Chithra.
Updated: 14 Nov 2018 9:14 EST


DXC Technology
CR
Hi, thanks so much to you answer.
I don't have any editable field in the page. I deleted all the items and just keep labels to know if I would have some field value, but the problem continues.
How can I see a pagination control?
The two links that you sent me didn't work.


Pegasystems Inc.
US
Sorry that the links are not working for you. I saw grid at the bottom of the screenshot so thought there are any pagination set for that.
Another option to try is to have a link as the first element in your harness and hide its visibility.


DXC Technology
CR
Hi, it neither didn't work.
Some another recommendation?
Regards


Pegasystems Inc.
US
Hi, I have a new option for you to try since it worked for me!
Create a text input and place it at the top of the section (in that harness) you are having issue. Configure the text input as follows in the "General" and "Presentation" tab and leave others to default. Let me know if it works:
Label value:
<script>$(window).on("load",function(){$(".elementToFocus input")[0].focus();});</script>
-
SRIKANTH YERMANI


Areantans
AU
use window.scrollTop(0,0)


Neal
US
Great suggestion.
How? and Where?
I've tried this in about every location including Actions/Script: blah blah blah! Extremely frustrating.


Pegasystems Inc.
IN
First editable/focusable content on your screen must be at the bottom.
You can simply add a hidden control to top of your page to resolve the issue.
Let us know if this helps.


DXC Technology
CR
Hi, thanks so much to your answer.
I already applied a hidden control and it didn't fix the issue. I am going to upload a image which contains the hidden text and the dynamic layout configuration so you can understand better my issue.
-
PR Reddy


Neal
US
This doesn't work.
Just tried it.
I'd expect something like window.scrollTo(0,0) but that doesn't work either.


Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write Post button here. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.