views:

32

answers:

2

I have a page where I open a popup window and the original window is supposed to stay usable. In IE and Chrome, I can switch back and forth between the parent and child, but in Firefox, if I click on the parent window, focus goes to the child (which just flashes tauntingly).

I look at Firefox's popup options, and the only one that seemed relevant is dependent, which wasn't set. Setting dependant=no didn't change anything either.

I'm creating my window with:

features = 'location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,dependent=no,width=1024,height=894,top=65,left=128';
windowRef = window.open(url, windowName, features);
+1  A: 

Very strange, you're not declaring the window to be modal but it's behaving like a modal dialog anyway. Try adding modal=no to the features:

var features = 'location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,dependent=no,width=1024,height=894,top=65,left=128,modal=no';
windowRef = window.open(url, windowName, features);
Andy E
I just tried this, and it didn't change anything. The Firefox docs seem to imply that this option can only be used by UI elements (https://developer.mozilla.org/en/DOM/window.open#section_9). I'm going to report this as a bug since I don't see how forcing all children of modal dialogs to be modal is useful.
Brendan Long
A: 

I figured out what was happening. My original window was created using showModalDialog(), and then I created a new window using window.open() inside of that. For some reason Firefox decided that since the original was modal, the child should be modal too. Time to see if this is a bug or a "feature".

Brendan Long