无法在xul面板中键入编辑器

时间:2011-03-06 14:50:44

标签: firefox-addon xul

无法在xul面板中输入编辑器是已知的bug in firefox

我只是想通过在线托管网络应用程序从我的谷歌浏览器扩展程序重用我的代码,并使用弹出窗口将其包含在Google Chrome和Firefox的扩展程序中。

这就是我包含webapp的方式

<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 个答案:

答案 0 :(得分:1)

在我看来,根据建议列表,您最好的选择是打开一个新窗口来代表您的弹出窗口。你可以通过设置它的位置,关闭OS crhome等来使它看起来像弹出窗口。