Last Comment Bug 596211 - [Linux] Wrong initial position for panel[noautohide="true"]
: [Linux] Wrong initial position for panel[noautohide="true"]
Status: RESOLVED WORKSFORME
:
Product: Core
Classification: Components
Component: XUL (show other bugs)
: Trunk
: All Linux
: P5 minor with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-14 06:32 PDT by Marc-Aurèle DARCHE
Modified: 2013-01-08 09:17 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
XUL file demonstrating opening up of a panel in the wrong initial position (855 bytes, application/vnd.mozilla.xul+xml)
2010-09-14 06:35 PDT, Marc-Aurèle DARCHE
no flags Details
Panel in a bad initial position (54.32 KB, image/png)
2010-09-14 09:38 PDT, Marc-Aurèle DARCHE
no flags Details
Panel in a good initial position (47.39 KB, image/png)
2010-09-14 09:39 PDT, Marc-Aurèle DARCHE
no flags Details
Simplest extension to demonstrate the panel placement problem on Linux (3.18 KB, application/octet-stream)
2010-09-16 12:41 PDT, Marc-Aurèle DARCHE
no flags Details
Source of the simplest extension (2.37 KB, application/octet-stream)
2010-09-16 12:41 PDT, Marc-Aurèle DARCHE
no flags Details
Simplest extension panel in a bad initial position (21.21 KB, image/png)
2010-09-16 12:42 PDT, Marc-Aurèle DARCHE
no flags Details
Simplest extension panel in a good initial position (22.48 KB, image/png)
2010-09-16 12:43 PDT, Marc-Aurèle DARCHE
no flags Details
Simplest extension to demonstrate the panel placement problem on Linux (3.31 KB, application/x-xpinstall)
2011-01-04 12:08 PST, Marc-Aurèle DARCHE
no flags Details
Source of the simplest extension (2.37 KB, application/x-gzip)
2011-01-04 12:11 PST, Marc-Aurèle DARCHE
no flags Details

Description Marc-Aurèle DARCHE 2010-09-14 06:32:30 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9
Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:2.0b5) Gecko/20100101 Firefox/4.0b5

I've tested this both with Firefox 3.6.x and Firefox 4.0x and both on Linux and Windows.

The behavior on Windows is correct and complies to what is described on https://developer.mozilla.org/en/XUL/panel

The problem only shows up on Linux, no matter the Firefox version, even Firefox 4.0b5.

Reproducible: Always

Steps to Reproduce:
1. In a XUL extension/addon create a panel:
<panel id="myextension-mypanel" noautohide="true">Here goes the content</panel>

2. Open up the panel relatively to a given anchor through JavaScript:
var anchor_elem_id = 'status-bar';
var anchor_elem = document.getElementById(anchor_elem_id);
var panel = window.top.document.getElementById('myextension-mypanel');
panel.openPopup(anchor_elem, 'before_end', -20, -5, false, false);

Actual Results:  
The panel is opened but not at the good position and the panel cannot receive any user interaction.

If one moves/drags the Firefox window, then the panel moves to the right position and starts to receive user interaction.

Expected Results:  
The panel should be opened at the right specified position and should react to user interactions.

The behavior is always wrong, whatever the parameters passed to openPopup:

panel.openPopup(anchor_elem, 'before_end', -20, -5, false, false) => wrong initial position

panel.openPopup() => wrong initial position
Comment 1 Marc-Aurèle DARCHE 2010-09-14 06:35:07 PDT
Created attachment 475068 [details]
XUL file demonstrating opening up of a panel in the wrong initial position

Here I join an example XUL file.

Sadly it's not fully working and thus demonstrating the problem since I cannot get, in the context of a loaded XUL file, the 'status-bar' DOM element to which anchoring the panel.
Comment 2 Marc-Aurèle DARCHE 2010-09-14 06:38:42 PDT
But I can modify this XUL example file if someone tells me how to get, if possible, the 'status-bar' from it.

Or if needed I can produce a small extension/addon to demonstrate the problem.

Please tell me.
Comment 3 Neil Deakin 2010-09-14 08:30:18 PDT
Where does the panel appear? Could you include a screenshot?

When I create a simple test, the popup appears correctly in the bottom right corner of the window offset by the (-20, -5) values specified.
Comment 4 Marc-Aurèle DARCHE 2010-09-14 08:39:30 PDT
(In reply to comment #3)
> Where does the panel appear? Could you include a screenshot?
> 

Thanks for your fast reaction on that! Sure, I will. It's coming.

> When I create a simple test, the popup appears correctly in the bottom right
> corner of the window offset by the (-20, -5) values specified.

Are you running the test that you are mentioning on Linux?

Is it possible that we have on a common .xul file as a base? If the one I have attached is not relevant or malfunctioning could you help me modify it to make it relevant please?
Comment 5 Marc-Aurèle DARCHE 2010-09-14 09:38:24 PDT
Created attachment 475111 [details]
Panel in a bad initial position
Comment 6 Marc-Aurèle DARCHE 2010-09-14 09:39:06 PDT
Created attachment 475112 [details]
Panel in a good initial position
Comment 7 Neil Deakin 2010-09-15 08:00:13 PDT
(In reply to comment #4)
> Is it possible that we have on a common .xul file as a base? If the one I have
> attached is not relevant or malfunctioning could you help me modify it to make
> it relevant please?

I took the test code you supplied and inserted it directly into browser.xul
Comment 8 Marc-Aurèle DARCHE 2010-09-15 09:01:10 PDT
(In reply to comment #7)
> (In reply to comment #4)
> > Is it possible that we have on a common .xul file as a base? If the one I have
> > attached is not relevant or malfunctioning could you help me modify it to make
> > it relevant please?
> 
> I took the test code you supplied and inserted it directly into browser.xul

OK. Thanks.

The problem is that the test code I've attached to this bug report cannot yet demonstrate the problem because I cannot manage to retrieve a reference on the statusbar with a XUL file loading itself into the browser outside of the context of an extension :-(

If you uncomment the following line in the XUL, you'll notice that the anchor_elem is null, and thus the test -- in it's actual state -- doesn't prove anything. But the problem is real nonetheless:
//alert("anchor_elem: " + anchor_elem);

If you could help me to retrieve the statusbar with this XUL file, that would demonstrate the problem. Here are the lines that would require your attention and kind help :-)
var anchor_elem_id = 'status-bar';
var anchor_elem = document.getElementById(anchor_elem_id);

But maybe it's impossible to retrieve the statusbar element from a XUL file loaded this way. Is it? If it is impossible, I can provide an extension/addon to fully demonstrate the problem. But I'm sure you would rather work on a single simple XUL file instead of an extension.
Comment 9 Neil Deakin 2010-09-15 09:05:15 PDT
You could make a single file and put a <statusbar> of your own in it. Assuming that you can reproduce it that way.

But if you can only get it to work by creating an extension, that's ok if needed. A simplified one is preferred of course, which only needs to be installed and specific steps followed to reproduce.
Comment 10 Marc-Aurèle DARCHE 2010-09-16 12:40:10 PDT
(In reply to comment #9)
> You could make a single file and put a <statusbar> of your own in it. Assuming
> that you can reproduce it that way.
> 

That doesn't create a statusbar the way I want and the problem is not reproducible that way.

> But if you can only get it to work by creating an extension, that's ok if
> needed. A simplified one is preferred of course, which only needs to be
> installed and specific steps followed to reproduce.

Here we go for the simplest extension demonstrating the problem *on Linux only* in the next attachment.
Comment 11 Marc-Aurèle DARCHE 2010-09-16 12:41:06 PDT
Created attachment 475956 [details]
Simplest extension to demonstrate the panel placement problem on Linux
Comment 12 Marc-Aurèle DARCHE 2010-09-16 12:41:55 PDT
Created attachment 475957 [details]
Source of the simplest extension
Comment 13 Marc-Aurèle DARCHE 2010-09-16 12:42:48 PDT
Created attachment 475959 [details]
Simplest extension panel in a bad initial position
Comment 14 Marc-Aurèle DARCHE 2010-09-16 12:43:26 PDT
Created attachment 475960 [details]
Simplest extension panel in a good initial position
Comment 15 Marc-Aurèle DARCHE 2010-09-24 22:19:39 PDT
The problem is still in Firefox 4.0b6.

Neil, have you had some time to test the extension demonstrating the problem please?

This extension can be installed up to 4.0b8pre version as specified in its install.rdf.
Comment 16 Marc-Aurèle DARCHE 2011-01-04 12:08:57 PST
Created attachment 501098 [details]
Simplest extension to demonstrate the panel placement problem on Linux

Updated to be compatible with Firefox 4.0.*
Comment 17 Marc-Aurèle DARCHE 2011-01-04 12:11:19 PST
Created attachment 501103 [details]
Source of the simplest extension

Updated to be compatible with Firefox 4.0.*
Comment 18 Marc-Aurèle DARCHE 2011-01-04 12:16:48 PST
The problem is still in Firefox 4.0b8.

The provided extension in this bugreport can be installed up to any 4.0.* version as specified in its install.rdf.

Neil, have you had some time to test the extension demonstrating the problem
please? I'd like to see this bug at least confirmed at least to attract attention.

Also note that this bug has an impact on Linux users being asked to participate in the Test Pilot studies. When the Test Pilot shows up, Linux users cannot click on any link until the firefox window is moved and the panel then is displayed to its good initial location.
Comment 19 Neil Deakin 2011-01-05 08:37:33 PST
I tested the extension, but the panel appears in the 'good position' as in comment 14 no matter where the window is.
Comment 20 Marc-Aurèle DARCHE 2011-01-05 09:37:08 PST
(In reply to comment #19)
> I tested the extension, but the panel appears in the 'good position' as in
> comment 14 no matter where the window is.

Thanks Neil for testing. Could you just tell me if you really did the test on Linux ? If so, which Linux distribution and version ? And finally with which window manager please?

I've been testing with Debian Squeeze on different systems with the following window managers: KDE 4.4, AfterStep
Comment 21 Marc-Aurèle DARCHE 2011-01-08 11:06:27 PST
Neil, I have redone my tests and the positioning problem in fact only happens with the AfterStep window manager. I somehow thought it appears with KDE too, but it's not happening anymore with KDE after several tests on different systems those last days.

So it is probably a bug in AfterStep and I'll check this with the AfterStep developers. So, so far it's a wrong alert and this bug can be closed.

Sorry for having wasting your time.

Note You need to log in before you can comment on or make changes to this bug.