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

[whatwg] Modal dialogs in HTML5

From: Philipp Serafin <phil127@gmail.com>
Date: Thu, 25 Dec 2008 19:29:31 +0100
Message-ID: <4953D10B.8060408@gmail.com>
Ian Hickson schrieb:
> On Thu, 18 Dec 2008, Philipp Serafin wrote:
>   
>> I think it would be a good idea to spec this algorithm as well then.
>>     
> The algorithm I described is basically CSS' "shrink wrap" algorithm. But 
> we can't really require it, as it assumes that the OS has windows. My 
> desktop, for example, doesn't have resizable windows, it only has tabs (I 
> use the 'ion' window manager).
>
>   
Well, you could still phrase it something along the lines of "The size 
of a popup document's viewport SHOULD be calculated using the CSS shrink 
wrap algorithm... etc etc".

All I really just want is to make sure browsers don't use today's 
implentations. If you open a popup/modal dialog today and don't specify 
a size, you usually end up with an arbitrary default size or even a 
full-fledged second browser window the size of your screen - both pretty 
ill-fitted for the use-cases of showModalDialog() IMO.

Example:
data:text/html,<button 
onclick="window.showModalDialog('data:text/html,<div style=\'width:1000; 
height:100; border: 1px solid black;\'>Awkward-sized dialog 
box</div>');">Click me!</button>
>> You still might want to keep the parameter for back compat though and 
>> just mark it as "deprecated". (Your algorithm would deform existing 
>> popup windows that assume their lengthy descriptions get line-wrapped 
>> automatically.)
>>     
>
> We'll probably define it in the "obsolete APIs" section in due course.
>
>   
cool!

Regards,
Philipp Serafin
Received on Thursday, 25 December 2008 10:29:31 UTC

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