Support Article
Action area drop-down doesn't work correctly with keyboard on IE
Summary
On Internet Explorer (IE) 11, when user tries to navigate in Action Area, which is configured with drop-down via keyboard, the section immediatly refreshes and opens the first action it finds, not allowing user to select appropriate value.
Issue is when user tabs into the Dropdown of pyActionArea and user presses Down key, system performs the action on the first item in the list.
Ideally, it should have just selected and should have waited for the user to click '‘Enter’ before performing action on the selection, but, it did not wait.
Error Messages
In case there are no available flow action and the form just has location action, the seperator is selected and form throws error message "Select an action..."
Steps to Reproduce
1. Open Internet Explorer 11.
2. Configure pyActionArea to display as drop-down.
3. While navigating in flow use keyboard and selection values on Other Action.
Notice that the screen immediatly refreshes and does not give oppertunity for user to select value.
Root Cause
This is the default behaviour of the Internet Explorer browser.
Resolution
To prevent this default behaviour of Internet Explorer browser, perform the below local-change steps:
- Save the UserWorkForm HTML fragment in the application ruleset.
- Paste the below code in this rule:
<script>
pega.u.d.attachOnload(function(){
var numberElements=document.querySelectorAll(".ie input[type='number']");
debugger;
for(var i=0;i<numberElements.length;i++){ console.log("number");
numberElements[i].addEventListener('keydown', function(e) {
console.log("inside");
var key = e.keyCode ? e.keyCode : e.which;
if (!( [8, 9, 13, 27, 46, 110, 190].indexOf(key) !== -1 ||
(key == 65 && ( e.ctrlKey || e.metaKey ) ) ||
(key >= 35 && key <= 40) ||
(key >= 48 && key <= 57 && !(e.shiftKey || e.altKey)) ||
(key >= 96 && key <= 105)
)) e.preventDefault();
});
}});
</script>
Published February 23, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.