聚合物1.x:模态纸对话框出现在其背景的后面 [英] Polymer 1.x: Modal paper-dialog appears behind its backdrop

查看:76
本文介绍了聚合物1.x:模态纸对话框出现在其背景的后面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人对解决模态出现在其背后的问题有任何建议吗?

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.

有什么想法吗?

此问题报告

推荐答案

这是我的解决方案:

openDialog: function(){
  var body = document.querySelector('body');
  Polymer.dom(body).appendChild(this.$.dialogId);
  this.$.dialogId.open();
}

这篇关于聚合物1.x:模态纸对话框出现在其背景的后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆