SOS

Shane O'Sullivan's technical blog… really ties the room together

Archive for June, 2008

Firefox 3 has proper modal dialogs!

Posted by Shane O'Sullivan on June 25, 2008

The application I work on for my employer makes extensive use of modal dialogs in Internet Explorer.  These are a nice feature where you can load a page in a dialog box, and the user cannot access the parent window until the dialog has closed – this includes forward/back buttons, menus, everything.

An issue we have had with supporting Firefox 2 is that it doesn’t support modal dialogs.

It seems to have completely been missed by the Firefox 3 fanboys, but Firefox 3 supports modal dialogs.  See my previous post on tips on how to use them.  This is a very very cool thing which I’m sure many people will find use for.  There aren’t many examples of modal dialog use around, since up until now it was IE-specific, but hopefully it’ll become much more popular.

The Mozilla team seem to have simply copied the window.showModalDialog function exactly from Microsoft, so any code previously used to open modals in IE works just fine in FireFox 3.

You’ve got to love open source: out-innovating the proprietary guys 99% of the time, then copying whatever you missed :-)

Update: I’ve confirmed that in FireFox 3 modal dialogs, unlike in IE, when you click a hyperlink the resulting page will correctly open in the dialog, and NOT open a new window.  This makes them infinitely more useful, and should negate the need for the horrendous hacks that IE forces on people.

Posted in Firefox, modal | 12 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 533 other followers

%d bloggers like this: