2012-10-01 37 views
1

我的webapp中有一个对话框弹出框(使用ArcGIS Javascript API w/Dojo)。在Firefox中,我得到一个正常运行的滚动条,但在IE中,有一个滚动条,但它不起作用......我可以向上/向下箭头滚动浏览,但当我这样做时,对话框会闪烁并且结结巴巴。 ...有什么建议么?谢谢,杰森dojo对话框中的滚动条不在IE9中工作

代码:

infoBox = new dijit.Dialog({ 
    //title: "Information", 
    id: "info", 
    content: infoText, 
    style: "width: 450px; height: 380px; overflow: auto", 
    autofocus: !dojo.isIE, // NOTE: turning focus ON in IE causes errors when reopening the dialog 
    refocus: !dojo.isIE 
    //autofocus: false, // I tried this alternative, but it didn't help 
    //refocus: false 

    }); 

(在我的设置,我有:META HTTP-当量= “X-UA兼容” 内容= “IE = 7”, “IE = 9”/ )

回答

1

试试这个代码:

domStyle.set(infoBox.containerNode, { 
    position: 'relative' 
}); 

顶部添加以下代码 -

require(["dojo/dom-style"], function(domStyle){ domStyle.get(node, style); domStyle.set(node, style, value); }); 
+0

谢谢...我试着添加这段代码并添加'dojo.require(“dojo.dom-style”)'但是我在Firebug中得到错误'domStyle is not defined'。如果我不添加这一行,我会得到同样的错误。 (我正在使用v3.1或ArcGIS JS API)。有什么建议么? – JasonBK

+0

看到我上面的评论,如果我不添加任何require语句,我也会收到一个错误“domStyle is not defined”。 – JasonBK

+0

你好,我还没有解决这个问题。上述解决方案对我不起作用;我得到上述错误...任何人有任何想法?我可以说我讨厌IE吗? – JasonBK