2011-03-06 41 views
1

无法在XUL面板键入到一个编辑器是一种已知的bug in firefox无法在XUL面板输入到编辑器

我只是想通过在线托管一个webapp并通过使用弹出窗口将它包含在扩展中,将google chrome和firefox包含在我的谷歌浏览器扩展中来重用我的代码。

这是我包括web应用程序

<popupset id="mainPopupSet"> 
    <menupopup id="smsflatrate-popup"> 
     <iframe height="500px" src="http://webapp.mysite.net/" 
       flex="1" type="content-primary"/>       
    </menupopup>  
</popupset> 

的问题是,有可能集中输入元素,但输入字段不上关键事件作出反应,因此,可以提供没有输入。

It seems that there is some kind of solution for this problem,但我认为我不太明白在这里做什么。

E.g.从上面的链接看,根据这篇文章,解决方案是什么?

There are many ways to display HTML in a XUL UI: 
1) including HTML inline in the XUL document. This should work fine everywhere, 
including in panels. 
2) include an HTML IFRAME in the XUL document. This currently works fine 
everywhere, except that IF the iframe is in a panel, there are some problems 
with focus. This bug is about that one issue. 
3) instead of a panel, you can create a XUL window using window.open that 
contains HTML inline or in an IFRAME, and everything should work. 

Having said that, if I open this bug's testcase in a Firefox trunk build, I 
*can* tab into the textbox and type into it, so it looks like focus is 
basically working now? The problem is that I can't focus the textbox by 
clicking on it. In fact, if you click on the arrow to do a search, you navigate 
to a new page where there is a textbox that you *can* click to focus. 

So I think we have here just some simple bug that's preventing click-to-focus 
from working, sometimes. Enn, can you look into that? 

回答

1

在我看来,鉴于建议清单中的最佳选择是打开一个新的窗口,代表你的弹出窗口。您可以通过设置其位置,关闭操作系统等,使其看起来像一个弹出窗口。