I have noticed that if I have a Javascript window.open() and focus() functions inside of a Bounded TaskFlow Bean, the popup window may open behind the current browser window.
the Workflow:
1. I have a <af:link text="New Page" id="l2" action="#{backingBeanScope.myBean.newPage}"/> tag in a JSFF page to call the function "newPage" in Class "myBean" (in backingBean Scope).
2. The "newPage" function will use window.open() function to pop up a new window and then use focus() function to focus the new window.
My Problem:
For FireFox, Chrome, they can open the new window foreground(in front of my current window). But for IE8 & IE9, the new window flashes once and then opens behind the current window.
My Current Solution:
My current solution is let the new page call Javascript window.focus() function when it onloads. It can get focused in IE now, but this happens after it flashes once, which seems very uncomfortable.
Would anyone know why this happens, and also be able to tell me how to get the popup window in this case, on top of the current browser window itself without flashes?
Many thanks.