[Linux] Wrong initial position for panel[noautohide="true"]

RESOLVED WORKSFORME

Status

()

Core
XUL
P5
minor
RESOLVED WORKSFORME
7 years ago
4 years ago

People

(Reporter: Marc-Aurèle DARCHE, Unassigned)

Tracking

Trunk
All
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(7 attachments, 2 obsolete attachments)

(Reporter)

Description

7 years ago
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
(Reporter)

Comment 1

7 years ago
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.
(Reporter)

Comment 2

7 years ago
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

7 years ago
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.
(Reporter)

Comment 4

7 years ago
(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?
(Reporter)

Comment 5

7 years ago
Created attachment 475111 [details]
Panel in a bad initial position
(Reporter)

Comment 6

7 years ago
Created attachment 475112 [details]
Panel in a good initial position

Comment 7

7 years ago
(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
(Reporter)

Comment 8

7 years ago
(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

7 years ago
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.
(Reporter)

Comment 10

7 years ago
(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.
(Reporter)

Comment 11

7 years ago
Created attachment 475956 [details]
Simplest extension to demonstrate the panel placement problem on Linux
(Reporter)

Comment 12

7 years ago
Created attachment 475957 [details]
Source of the simplest extension
(Reporter)

Comment 13

7 years ago
Created attachment 475959 [details]
Simplest extension panel in a bad initial position
(Reporter)

Comment 14

7 years ago
Created attachment 475960 [details]
Simplest extension panel in a good initial position
(Reporter)

Comment 15

7 years ago
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.
Version: unspecified → Trunk
(Reporter)

Comment 16

6 years ago
Created attachment 501098 [details]
Simplest extension to demonstrate the panel placement problem on Linux

Updated to be compatible with Firefox 4.0.*
Attachment #475956 - Attachment is obsolete: true
(Reporter)

Comment 17

6 years ago
Created attachment 501103 [details]
Source of the simplest extension

Updated to be compatible with Firefox 4.0.*
Attachment #475957 - Attachment is obsolete: true
(Reporter)

Comment 18

6 years ago
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

6 years ago
I tested the extension, but the panel appears in the 'good position' as in comment 14 no matter where the window is.
(Reporter)

Comment 20

6 years ago
(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
(Reporter)

Comment 21

6 years ago
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.
Severity: normal → minor
Priority: -- → P5
(Reporter)

Updated

4 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.