Paper-Dialogs not always centered after resizing the browser window

723 views
Skip to first unread message

ru...@syncofy.com

unread,
Oct 7, 2014, 6:50:24 AM10/7/14
to polym...@googlegroups.com
Hi,

I've noticed that paper-dialogs aren't always properly repositioned when resizing the browser.

When resizing while the dialog is open everything behaves normally and the dialog stays in the middle of the page. However, if you open a dialog, close it, resize the browser and open it again it won't be centered like it's supposed to be.

I've added screenshots showing the problem but anyone should be able to see it for themselves on the Paper Dialog demo page ( https://www.polymer-project.org/components/paper-dialog/demo.html ).

Any ideas?

Cheers!
dialog1.jpg
dialog2.jpg

Yvonne Yip

unread,
Oct 7, 2014, 12:09:57 PM10/7/14
to ru...@syncofy.com, polymer-dev

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 polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/7746e957-b3f7-40bb-ac9e-bf97b0c6f0db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yvonne Yip

unread,
Oct 7, 2014, 1:19:24 PM10/7/14
to ru...@syncofy.com, polymer-dev
FYI, I can also reproduce this in core-overlay.

On Tue, Oct 7, 2014 at 3:50 AM, <ru...@syncofy.com> wrote:
Follow Polymer on Google+: plus.google.com/107187849809354688692

Steve Orvell

unread,
Oct 7, 2014, 2:00:16 PM10/7/14
to Yvonne Yip, ru...@syncofy.com, polymer-dev

ru...@syncofy.com

unread,
Oct 8, 2014, 1:13:10 PM10/8/14
to polym...@googlegroups.com, yky...@google.com, ru...@syncofy.com
Hey,

thanks for the quick responses! Unfortunately the latest commit hadn't fixed the issue.

However, I looked through core-overlay.html and noticed that the function "transitionend" seems to be called every time an overlay is closed. Among other things it adds an element style "display: none;" to the target to hide the overlay. I just added:

this.target.style.left = "";
this.target.style.top = "";

right below the "display:none" line to reset the left and top values whenever a dialog is closed.  These two lines seem to have fixed the issue. Would this be a legitimate solution or is there potential it could break something else?

Cheers

cayte...@gmail.com

unread,
Nov 4, 2014, 2:14:15 AM11/4/14
to polym...@googlegroups.com, ru...@syncofy.com
Hi,

I've created another dialog component using Polymer after trying out paper-dialog and find it not suitable for production use. The github repo link is https://github.com/Appist/appist-dialog. Thanks.

to.ks...@gmail.com

unread,
Jan 22, 2015, 8:19:45 PM1/22/15
to polym...@googlegroups.com, ru...@syncofy.com, cayte...@gmail.com
Just wondering if this dialog positioning issue will be resolved in the next release?  I can still reproduce it using the latest version of the component.

Kelly

Kris Siegel

unread,
Mar 3, 2015, 3:21:52 PM3/3/15
to polym...@googlegroups.com, ru...@syncofy.com, cayte...@gmail.com, to.ks...@gmail.com
I just ran into this issue myself. Resizing the window almost always fixes the position of the dialog (not sure if this is technically the same source for the issue as the OP).
Reply all
Reply to author
Forward
0 new messages