[whatwg] Comments on <dialog>
Brian Blakely
anewpage.media at gmail.com
Wed Dec 18 10:21:42 PST 2013
On Tue, Dec 17, 2013 at 3:14 PM, Ian Hickson <ian at hixie.ch> wrote:
> I've added a rule to the spec that says that viewports have to be pannable
>
so you can see all of a dialog, but I don't know how feasible that really
> is.
>
I could see implementations using shadow <div>s to satisfy this It might
be beneficial to even codify kind of element as ::modal, representing a
modal layer acting as an ancestor for both the ::backdrop and <dialog>.
> > > > 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.
> >
> > To go back to hacky and rather difficult-to-maintain JS techniques for
> > something so simple seems antithetical to the intention of <dialog> to
> > me. Modern modal implementations don't require that.
>
> My point isn't that we shouldn't offer the feature because it is already
> possible. My point is that this feature is actively bad. I'm saying I
> don't think it's good UI for the dialog position to change when it
> increases in height.
It looks like Blink's implementation will recenter the modal when
show/showModal are called.
More information about the whatwg
mailing list