如何将zIndex设置为dijit.TooltipDialog? [英] How do I set the zIndex on a dijit.TooltipDialog?

查看:312
本文介绍了如何将zIndex设置为dijit.TooltipDialog?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个dijit.TooltipDialog,一切都应该是正常的。但是,如果从工具提示对话框中产生另一个对话框,则会显示在工具提示对话框后面,而不是在其上。我在2个对话框上检查了zIndex,工具提示对话框为1000,另一个对话框为950。

I've created a dijit.TooltipDialog and everything works as it should. However, if another dialog is produced from within the tooltip dialog it shows up behind the tooltip dialog instead of on top of it. I checked the zIndex on the 2 dialogs and the tooltip dialog is 1000 and the other dialog is 950.

我已经尝试在相应的容器节点上设置zIndex,工具提示对话框的domNode都没有运气。所以有人知道如何在工具提示对话框上设置zIndex?

I've tried setting the zIndex on the respective container node and the tooltip dialog's "domNode" both with no luck. So does anyone know how to set the zIndex on the tooltip dialog?

推荐答案

以下mschr的答案我找不到underlayAttrs属性的dijit.Tooltip对话框。但是这确实导致我找到_popupWrapper,它是整个弹出窗口的包装器节点。该节点的zIndex为1000.以下代码更正了以下问题:

Following mschr's answer I couldn't find the underlayAttrs property of dijit.TooltipDialog. But that did lead me to finding _popupWrapper which is the wrapper node of the entire popup. This node had a zIndex of 1000. The below code corrected the issue:

var dij = dijit.byId(dojo.query("[id*='_TooltipDialog_']")[0].id);
dij.onShow = function() {
    dojo.style(dij._popupWrapper,"zIndex",900);
}

这篇关于如何将zIndex设置为dijit.TooltipDialog?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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