I am using popup.focus()
to focus a popup window after a button is clicked. The focus()
is working fine for all the browsers except for ****EDGE**** browser. The issue I am facing is intermittent. At times I am able to view the popup window (child popup dialog box) on the browser and at times behind the browser i.e. on the desktop and I am able to identify that the popup is open by the flashing on the task bar.
Any suggestion would be really appreciated.
var popup = new PopupWind(url,'config')
popup.setFeature('height', height)
popup.setFeature('resizable', 'no')
popup.setFeature('scrollbars', 'no')
popup.setFeature('left', xLoc) // IE
popup.setFeature('top', yLoc)
popup.setFeature('screenx', xLoc) // NS
popup.setFeature('screeny', yLoc)
popup.open()
popup.focus();
I tried using this to make focus() work in EDGE but it did not
popup.blur();
setTimeout( popup.focus,0);