Reputation: 1096
So I have an interesting issue. I have a page that allows users to select image urls from external sources. Instead of doing this the sane way with jquery modals or something, the page in question creates a child window. That child window can then call JS functions on the parent to insert said URLs.
Now if our user happened to select a number of very specific settings and the stars are aligned just right, the parent page will display an alert box telling them something along the lines of "because you selected option A, E and F, we must alter option B just slightly."
Here is the issue: firefox doesn't display alerts like Chrome or IE (a seperate window with an ok box). With the latest firefox the alert stays hidden under the child window:
For the screen shot here I moved the child window so you could see the alert under the child. If the window isn't moved, the user wont see the box and will continue trying to click the "done" button which triggers the same call again, and again, and again etc.
Is there a way I can give the parent window focus when the alert comes up (without messing with about:config)? I can't alter the parent function that much as the code is very old and it has a tendency to break things if servilely altered (I have no idea what else calls said function).
Upvotes: 1
Views: 904
Reputation: 334
Since you are passing the information back and forth anyhow, wouldn't it be more prudent to just send that message to the child window and alert it there?
That would save you the need to worry about shifting focuses and potentially losing windows.
Upvotes: 1