One HTML page is calling a backend application which returns an HTML page containing some javascript code. That code is using window.open syntax to call another page in its own window. Normally, when returning that code, I also send window.history.go(-1) to force the originated page to go where it was prior to calling the transaction.
This works for a while. Now, probably related to the time that the new window is taking to open and load everything, when the window.history.go(-1) is done on the orignated page, the focus is also activated on that page. Before, the history was doing its process in the back. Now, the history activates the focus. So, the new window opened only appears for a second and looses its focus. How can I force it to keep its focus? In order word, the main goal here is to have the orignated window to go back where it was before posting the form without affecting the new window opened in regards to its focus.