Question
Accenture
JP
Last activity: 30 Nov 2018 12:43 EST
How to disable set focus at the first element
Hi team
PRPC set default focus at the first input element when load window, but we want disable it. Is there any way to do that?
I found a similar post asking how to set the focus on specific element instand of the first, but we need not any focus on the screen.
https://community1.pega.com/community/product-support/question/disable-default-set-focus
*We are using ver 7.3.1 and Web Mashup
Thanks
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi,
For your requirement, you can configure the hidden element and set the default focus (please refer https://collaborate.pega.com/question/disable-default-set-focus to set the default focus to hidden element).
Regards,
Praveen
Accenture
JP
Hi
Thank you for your suggestion. But we do need to disable any focus, the reason is we are using Pega Web Mashup included in a host application page. When refreshing the window, default focus transfer to the part of Mashup part instand of the top of the host page.
What would be a good way to do it?
Thanks
Pegasystems Inc.
US
It might be possible that the focus is getting set in the file "pega_yui_container ". Can you try to put "debugger;"(without quotes) at various places in this file and can debug to find exactly where the focus is getting set.
Pegasystems Inc.
US
You can use a "set timeout" function in the custom javascript and use the same on the hidden property which should in the top of the UI.
Example of the "set timeout" function has been explained below.
https://netserved.wordpress.com/2015/05/07/using-focus-with-settimeout-in-jquery-javascript/
Pegasystems Inc.
US
Hi, If you have control on the application hosting web mashup, could you try having a hidden text input like control to be focused on load of the window.
Thanks,
Chithra.
Accenture
JP
Hi team
Thanks for you all sugestions. It seems setting the first element focus has been coded as a part of final rule and can not be modified easly.
And I have tried to add a focus to a hidden text input but it does not work, also disable and invisble elements can no be the target of focus also.
So I finnaly added a small blank icon at the top of our Mashup UI and set focus on it by customize JQuery code and it works. But I think it is not the best practice to resolve it, if anyone has idea around this please share it with us, thank you
-
Istvan Szepkuti Raju Botu Michael Greenwood
Pegasystems Inc.
US
Hi,
The issue here is when the page loads the order of dom execution finds where the focus need to happen. Since you have mashup code which gets loaded in the iframe the elements are evaluated based on the where the first interactive elements it present and tabindex. We are trying to intercept the normal behavior to accomplish something differently which complicates. Let me know if you find a better solution!
Thanks!