[whatwg] Comments on <dialog>
Ian Hickson
ian at hixie.ch
Wed Dec 18 11:13:45 PST 2013
On Wed, 18 Dec 2013, Brian Blakely wrote:
> 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>.
Not really sure how this would work. Can you elaborate?
> > > > > 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.
That's per spec, yes. The suggestion above was regarding when the dialog
changes size while it's already visible, I believe.
--
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