FF3 migration: xul elements not visible over browser appcontent area - Mozilla

This is a discussion on FF3 migration: xul elements not visible over browser appcontent area - Mozilla ; Hi, puzzled by this "new in FF3" behavior: I can't seem to get XUL elements (whether inserted declaratively via overlay.xul or created and inserted programmatically) to show over the appcontent area within a browser of the tabbrowser element. For instance, ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: FF3 migration: xul elements not visible over browser appcontent area

  1. FF3 migration: xul elements not visible over browser appcontent area

    Hi,

    puzzled by this "new in FF3" behavior: I can't seem to get XUL
    elements (whether inserted declaratively via overlay.xul or created
    and inserted programmatically) to show over the appcontent area within
    a browser of the tabbrowser element.

    For instance, if I inject a vbox under the main window via overlay.xul
    as follows:

    xmlns:html = "http://www.w3.org/1999/xhtml"
    xmlns = "http://www.mozilla.org/keymaster/gatekeeper/
    there.is.only.xul">






    the fragment of the box that's NOT overlapping the appcontent is
    visible, but not the part overlapping the content.

    The same is true if the vbox is injected dynamically via JS later on
    in the browser lifecycle.

    Any hints as to what is going on, or better yet how to get XUL
    elements to show over the appcontent area?

    Thanks.

  2. Re: FF3 migration: xul elements not visible over browser appcontentarea

    jean.sini@gmail.com wrote:
    > Hi,
    >
    > puzzled by this "new in FF3" behavior: I can't seem to get XUL
    > elements (whether inserted declaratively via overlay.xul or created
    > and inserted programmatically) to show over the appcontent area within
    > a browser of the tabbrowser element.


    You can't, and you couldn't before firefox 3 either. It's bug 130078.

    Also, the css position property has no effect in xul.

    Neil

  3. Re: FF3 migration: xul elements not visible over browser appcontentarea

    On Nov 25, 9:40 am, Neil Deakin wrote:

    > You can't, and you couldn't before firefox 3 either. It's bug 130078.


    Hi Neil, thanks for your reply. Actually, you are correct about
    statically injected XUL elements (e.g. via an overlay.xul) being
    invisible over the appcontent area. But prior to FF3, it was possible
    to inject XUL elements programmatically and have them visible over the
    appcontent area until the next redraw of the current tab. Here's what
    I mean:

    1. define a basic XBL binding (chrome://my-ext/content/bindings/
    testbox.xml):

    id="testBindings"
    xmlns="http://www.mozilla.org/xbl"
    xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/
    there.is.only.xul"
    xmlns:xbl="http://www.mozilla.org/xbl">









    2. bind via CSS:
    testBox
    {
    -moz-binding: url("chrome://my-ext/content/bindings/
    testbox.xml#testbox");
    }

    3. define a Javascript function to create and inject the element:
    injectTestBox: function(id)
    {
    try
    {
    var box = document.createElement("testBox");
    box.id = "testBox-"+id;
    document.getElementById("main-window").appendChild(box);
    }
    catch(e)
    {
    alert("overlay.js - injectTabscope()",e);
    }
    }

    4. using a toolbar button defined in overlay.xul, invoke the
    Javascript function at will.

    Using the approach outlined above (I am happy to share a fully
    functional code sample) we are able (in FF2.0.0.x) to create, inject,
    and see the box over the content area of the browser; you are correct:
    it is masked by the next redraw, but that's fine.
    So I don't think my use case falls strictly under 130078.

    Unfortunately, this doesn't work in FF3: the box is always hidden by
    the content. If you know of any workaround, it would be great!

  4. Re: FF3 migration: xul elements not visible over browser appcontentarea

    jean.sini@gmail.com wrote:
    > Using the approach outlined above (I am happy to share a fully
    > functional code sample) we are able (in FF2.0.0.x) to create, inject,
    > and see the box over the content area of the browser; you are correct:
    > it is masked by the next redraw, but that's fine.
    >


    Sounds like a bug that was fixed in Firefox 3. It shouldn't have been
    drawing overtop at all until 130078 is fixed.

  5. Re: FF3 migration: xul elements not visible over browser appcontentarea

    Hi all,

    I'm in the same boat as Jean. I have a couple extensions that I am
    developing that open small XUL box elements on top of the browser;
    specifically the vbox with id "appcontent". My approach is similar to
    Jean's but slightly different as I was appending to the xul stack
    element "browser-stack" in brower.xul. I think this might be one of
    the issues that both Jean and I have encountered with our migrations.

    In Firefox2, the hbox "browser" in the brower.xul was in the stack
    "browser-stack". This stack element allowed for the pop up box effect
    to be incorporated into extensions. In Firefox3 currently, the
    browser.xul lacks this stack element. As such, extensions that rely
    on it can no longer perform their pop up box effects.

    I think a simple (but completely untested) fix would be to put the
    stack element "browser-stack" back in.

    For reference, you can check lines 1295-1329 in the Firefox2
    browser.xul and 1129-1156 in the Firefox3 browser.xul.

    --
    Chris Jordan

    On 25-Nov-07, at 6:11 PM, jean.sini@gmail.com wrote:

    > On Nov 25, 9:40 am, Neil Deakin wrote:
    >
    >> You can't, and you couldn't before firefox 3 either. It's bug 130078.

    >
    > Hi Neil, thanks for your reply. Actually, you are correct about
    > statically injected XUL elements (e.g. via an overlay.xul) being
    > invisible over the appcontent area. But prior to FF3, it was possible
    > to inject XUL elements programmatically and have them visible over the
    > appcontent area until the next redraw of the current tab. Here's what
    > I mean:
    >
    > 1. define a basic XBL binding (chrome://my-ext/content/bindings/
    > testbox.xml):
    >
    > > id="testBindings"
    > xmlns="http://www.mozilla.org/xbl"
    > xmlns:html="http://www.w3.org/1999/xhtml"
    > xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/
    > there.is.only.xul"
    > xmlns:xbl="http://www.mozilla.org/xbl">
    >
    >
    >
    >
    >

    >

    >

    >
    >
    > 2. bind via CSS:
    > testBox
    > {
    > -moz-binding: url("chrome://my-ext/content/bindings/
    > testbox.xml#testbox");
    > }
    >
    > 3. define a Javascript function to create and inject the element:
    > injectTestBox: function(id)
    > {
    > try
    > {
    > var box = document.createElement("testBox");
    > box.id = "testBox-"+id;
    > document.getElementById("main-window").appendChild(box);
    > }
    > catch(e)
    > {
    > alert("overlay.js - injectTabscope()",e);
    > }
    > }
    >
    > 4. using a toolbar button defined in overlay.xul, invoke the
    > Javascript function at will.
    >
    > Using the approach outlined above (I am happy to share a fully
    > functional code sample) we are able (in FF2.0.0.x) to create, inject,
    > and see the box over the content area of the browser; you are correct:
    > it is masked by the next redraw, but that's fine.
    > So I don't think my use case falls strictly under 130078.
    >
    > Unfortunately, this doesn't work in FF3: the box is always hidden by
    > the content. If you know of any workaround, it would be great!
    > _______________________________________________
    > dev-extensions mailing list
    > dev-extensions@lists.mozilla.org
    > https://lists.mozilla.org/listinfo/dev-extensions



  6. Re: FF3 migration: xul elements not visible over browser appcontentarea

    Hi,
    Along those lines, has anyone gotten any luck deriving a somewhat long-
    lasting element from the new xulanel element (it inherits from
    xulopup), which does render above the appcontent area?
    The xulanel element is a general container, but its default show/
    hide behavior (hide in particular) makes it unsuited for an immediate
    xul:box replacement - wondering if anyone figured out how to get a
    xulanel to stick around.
    Best,
    Jean

  7. Re: FF3 migration: xul elements not visible over browser appcontentarea

    Hi all,

    I have been playing around with the FF3 brower.xul file and my early
    suggestion unfortunately does not work. I have also been playing
    around with the panel element and encountered the same problem as
    Jean; I can not make the pop-up stay visible after the user clicks
    off of it. This is quite unfortunate as you can display to users
    valuable information in pop-up boxes and they want that information
    to stay visible as the read a Web page.

    I am wondering if a bug has been file about the issues in rendering
    boxes over the appcontent area or a request been made to have the
    option of turning off the automatic hiding of a panel when the user
    clicks off of it.

    --
    Chris Jordan

    On 26-Nov-07, at 1:26 PM, jean.sini@gmail.com wrote:

    > Hi,
    > Along those lines, has anyone gotten any luck deriving a somewhat
    > long-
    > lasting element from the new xulanel element (it inherits from
    > xulopup), which does render above the appcontent area?
    > The xulanel element is a general container, but its default show/
    > hide behavior (hide in particular) makes it unsuited for an immediate
    > xul:box replacement - wondering if anyone figured out how to get a
    > xulanel to stick around.
    > Best,
    > Jean
    > _______________________________________________
    > dev-extensions mailing list
    > dev-extensions@lists.mozilla.org
    > https://lists.mozilla.org/listinfo/dev-extensions



+ Reply to Thread