[whatwg] Modal dialogs in HTML5
Philipp Serafin
phil127 at gmail.com
Thu Dec 25 10:29:31 PST 2008
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
More information about the whatwg
mailing list