It seems I've run into the same bug you've already reported.  I think your 
workaround is better than removing the 'max-height' style after it's been 
erroneously applied.

Thanks for your help!


On Sunday, 12 July 2015 07:08:32 UTC-6, Bin Wang wrote:
>
> I think it's a bug of iron-fit-behavior,  I have filed an issue 
> <https://github.com/PolymerElements/iron-fit-behavior/issues/13> .
> Solution: wrap your dialog into a top-left positioned div, like this:
>
>> <body>
>>   ...
>>   <div id="modals-container" style="position:absolute;top:0;left:0">
>>     ...your dialogs here
>>   </div>
>> </body>
>
>
> Good luck! 
>
> On Saturday, July 11, 2015 at 9:08:25 PM UTC+8, Adam McKee wrote:
>>
>> Hi,
>>
>> In my project I'm creating a paper-dialog with JavaScript similar to this:
>>
>> var fragment = "<paper-dialog id='mydialog' modal='true' 
>> ...>...</paper-dialog>";
>> $('body').append(fragment);
>> var $dialog = $('#mydialog');
>> var dialog = $dialog.get(0);
>> Polymer.Base.async(function(){
>>         dialog.toggle();
>>
>>         // correct the unfathomable style "max-height: 0px;" applied to 
>> the dialog after toggle() is called
>>         if ($dialog.css('max-height') == '0px') $dialog.css('max-height', 
>> 'none');
>>     }, 1);
>>
>> What I find is: after dialog.toggle(), the dialog element is given the 
>> style "max-height: 0px" (in its style attribute).  Does anyone know *why 
>> on Earth* this would happen?  Max-height of 0 is totally unexpected.
>>
>> Thanks for any ideas!
>>
>>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/ac51867a-0367-4681-bf4a-99b22da8a422%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to