[whatwg] Concerns with <dialog>

Ian Hickson ian at hixie.ch
Sat Nov 2 14:29:40 PDT 2013

On Sat, 2 Nov 2013, Brian Blakely wrote:
> 1. When a modal dialog is active, the user can still scroll the 
> underlying page.

Why is that a bug?

It seems bad if you can't, since you might need to refer to information in 
the underlying page.

> 2. Even if the root element has overflow hidden, it should be possible 
> to scroll the modal "layer" when a dialog escapes the boundaries of the 
> viewport (or iframe).

Why? Isn't the whole point of 'overflow: hidden' on the root element to 
prevent the ability to move the viewport?

You can always but the overflow property on a child of the <body>, e.g. a 
fixed positioned <div>. Then the scrollbars would be hidden for the div, 
but the viewport could still be moved for dialogs.

> 3. When the modal dialog's height changes, either due to CSS or content 
> changes, the vertical position of the dialog should change (unless the 
> height exceeds the viewport height).

That's an interesting idea, but I'm not convinced it's the right answer. 
Having the dialog move up and down when stuff is added at the bottom would 
be quite weird. You can always implement this manually from script.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list