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

Set focus action is not working in IE 11

SA-34838

Summary



There are a couple of actions on click of a text input.

First action is Launch Local action.
Second action is Set Focus action(set focus target is the same element on which actions are triggered)

In the first action after Overlay is launched and if there is any text input or Grid in the section then the focus is going to the grid, or text input but the expected behavior is second action should be triggered and focus should be set on the parent element from which actions are being triggered.

The use case is working fine in Chrome browser but the issue is only in Internet Explorer.


Error Messages



Not Applicable


Steps to Reproduce

  1. Create an Input box.
  2. Configure the events as below :
    On click event - set value, launch local action, bring the focus back to input box.


Root Cause



Internet Explorer is taking a little more time to render the UI than Chrome, resulting in firing the setItemFocus action first and then focusFirstItem method to focus the first focusable element inside the modal/overlay (As per design).

Resolution



Override the setItemFocus function in UserWorkForm.

The last part of setItemFocus is modified as below:


setTimeout(function(){
targetElem.focus();
if (targetElem.type == "textarea")
pega.u.d.setCursorAtEndofText(targetElem);
else if (targetElem.select && targetElem.select != undefined) {
targetElem.select();
}
},300);




Published March 23, 2017 - 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