聚合物1.x:模态纸对话框出现在其背景的后面 [英] Polymer 1.x: Modal paper-dialog appears behind its backdrop
问题描述
有人对解决模态出现在其背后的问题有任何建议吗?
Does anybody have any advice for fixing the problem of a modal appearing behind its backdrop?
到目前为止,我已经尝试确保我拥有所有必要的进口货物(包括<paper-dialog-scrollable>
).
So far, I have tried making sure I have all the necessary imports (including <paper-dialog-scrollable>
).
我还尝试了"hack-fix"(有人建议 )涉及在paper-header-panel
的CSS中设置z-index: auto
.都行不通.
I also tried a "hack-fix" (suggested by someone) involving setting z-index: auto
in the css of paper-header-panel
. Neither works.
值得注意的是,<paper-dialog>
标签可以正常工作.直到添加modal
属性.
It's worth noting that the <paper-dialog>
tag works just fine. Until I add the modal
attribute.
有什么想法吗?
此问题报告和
这是我的解决方案: 这篇关于聚合物1.x:模态纸对话框出现在其背景的后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!推荐答案
openDialog: function(){
var body = document.querySelector('body');
Polymer.dom(body).appendChild(this.$.dialogId);
this.$.dialogId.open();
}