W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2008

[whatwg] Modal dialogs in HTML5

From: Philipp Serafin <phil127@gmail.com>
Date: Thu, 18 Dec 2008 14:28:30 +0100
Message-ID: <494A4FFE.5020809@gmail.com>
Ian Hickson schrieb:
> On Wed, 17 Dec 2008, Jo?o Eiras wrote:
>> While I myself don't find any decent use case for positioning the 
>> window, I think sizing the popup is a common and useful use case,besides 
>> controlling other aspected already covered by window.open(). Because the 
>> behavior for the features argument in window.open() and showModalDialog 
>> are similar (if not equal), I would recommend adding it to 
>> showModalDialog for the sake of normalization (you could link one spec 
>> to the other) and because UA would eventually reuse the implementation 
>> of window.open for both cases, therefore not requiring extra work from 
>> scratch.
> I haven't specced it for window.open() either.
I agree, absolute pixel values are not really any good to specifying the 
size in any environment that should run on more than one machine. 
However, how are you supposed to control the size of your dialog otherwise?
A normal web page is resized to fit into the window, and not vice versa, 
because the user usually has the browser open before he navigates to a 
page and constant resizing of the browser window would be irritiating to 
put it mildly.
But this is not the case with popup/dialog windows. (At least the cases 
where they are not abused brutally)
There is no reasoneable "default size" the page could adjust to. If the 
author can't specify the size of a popup/dialog, what algorithm should 
the UA use to find out the correct optimal  size?
As an example, many rich text editors use modal dialogs to specify font 
settings, etc. The HTML in the dialogs could be displayed in a 
normal-sized browser window effortlessy. However, it would look pretty 

Philipp Serafin
Received on Thursday, 18 December 2008 05:28:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:46 UTC