> and in some
> situations, it might need to be the parent document's body if you are in
> an IFrame.

That’s not going to work unless there’s some way to create elements in the 
outer document which we currently don’t have.

I think the simplest way to go about it, is to leave it as-is for now. It’s 
actually about as simple as it can be.

I assume in another half-year or so we’re going to move over to mdc-web when it 
has it’s release.[1][2]

They are in the process of working on dialog in a way which does not use 
<dialog>, so I’m assuming it can be used somewhere other than <body>.[3][4]

[1]https://github.com/material-components/material-components-web 
<https://github.com/material-components/material-components-web>
[2]https://www.pivotaltracker.com/n/projects/1664011 
<https://www.pivotaltracker.com/n/projects/1664011>
[3]https://github.com/material-components/material-components-web/issues/32 
<https://github.com/material-components/material-components-web/issues/32>
[4]http://codepen.io/amsheehan/pen/QdBPXL?editors=0100 
<http://codepen.io/amsheehan/pen/QdBPXL?editors=0100>

> On Feb 25, 2017, at 7:37 AM, Alex Harui <aha...@adobe.com> wrote:
> 
> 
> 
> On 2/24/17, 3:00 AM, "Harbs" <harbs.li...@gmail.com 
> <mailto:harbs.li...@gmail.com>> wrote:
> 
>> Having two discussions in one thread is confusing… ;-)
>> 
>> I guess we could make a custom object, but I’m not sure what the point
>> is. AIUI, the purpose of IPopUpHost is to support many levels of popups.
>> Assuming we are right that dialog must be attached to <body>, the
>> simplest way to handle that is to attach it directly.
>> 
>> However, I just looked around a bit, and it seems like that’s not true.
>> It looks like dialog can be attached to pretty much any element. The only
>> caveat seems to be in the polyfill that it’s supposed to not be in an
>> element which has a stacking context.[1]
>> 
>> What I’m not sure about dialog is whether the position can be relative to
>> an element, or it’s always relative to the whole page. Depending on the
>> answer to that, it might make sense to allow different IPopUpHosts, or
>> not.
> 
> IMO, that's the point of IPopUpHost.  It allows various configurations to
> dictate where to hang the popups.  It doesn't have to be body, and in some
> situations, it might need to be the parent document's body if you are in
> an IFrame.
> 
> Regular Flex has a PopUpManager, but really, it was designed for multiple
> overlapping windows like in MS Windows and was overkill for most
> applications.  In fact, the FlexJS examples don't have a PopUpManager and
> can still hang one modal dialog at a time somewhere.  So, IMO, popup
> support should also be PAYG and have an abstraction that doesn't assume it
> is the <body> tag.
> 
> My 2 cents,
> -Alex

Reply via email to