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

CPM portal steals focus from third party browser in Pega 7.1.7



A Customer Process Manager (CPM) user portal is launched in a new browser window, on click of a button that is present in a third party browser based application window. When the CPM portal window completes loading, it steals focus from the third party application browser window.

Error Messages

Not Applicable.

Steps to Reproduce

Create and run a sample HTML page as below, to mimic a third party browser based non-Pega application:

function abc(){ 
a ="http://<host name>:<port number>/prweb/PRServlet"); 

<input type="button" id="btn" value="OpenPega" onClick="javascript:abc();" /> 

2. Click "OpenPega" button. It opens the PRPC login page in a new window.
3. Click New>Phone call in the CPM portal window.
4. While the phone call tab is being loaded, quickly click on the parent window (so that CPM portal window goes behind the parent). 
5. Once the phone call tab is loaded , that CPM portal window steals focus and stays on the top of parent window.

Root Cause

The reported use case works as designed per Pega 7 functionality. CPM portal are designed to steal focus to support accessibility.


Perform the following local-change if you do not want Pega portal to steal focus from your parent application window : 

1. Save-As UserWorkForm HTML fragment into your application layer
2. Copy the below code into it :
pega.u.d.initFocusOnFirstInput = function(){}

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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