Open ghost opened 9 years ago
I'm having the exact same issue however it's not related to paper-icon-button at all. When adding a paper-dialog to a DOM dynamically (i.e. appendChild(document.createElement("paper-dialog")) it causes this same exact issue with the workaround being resizing the window.
I'm working on a project for a client where I'm using this so I'm actively looking for a workaround or solution at the moment. Hopefully your issue and my issue are caused by the same underlying problem.
I just found a workaround that at least resolved the issue I am having, maybe it will work for you as well.
myDialog.addEventListener("core-overlay-open-completed", function (e) {
myDialog.resizeHandler();
});
EDIT: Originally used repositionTarget() but after a minor polymer version update (sorry, didn't track which one) that stopped working. resizeHandler() however works as expected so my workaround has been updated.
I have the same problem a paper-dialog opened by a paper-button
If
paper-dialog
if called frompaper-icon-button
, then the dialog has wrong dimensions and placed at the bottom-right part of the window. See:To reproduce this issue, use following code.
Workaround: use
core-icon-button
instead ofpaper-icon-button
. Also resizing the window fixes that.