centerWindowOnScreen() is not working with <prefwindow> windows

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
13 years ago
9 years ago

People

(Reporter: laebcontact, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1

An option window defined as a <prefwindow> wont'be displayed at the center of
the screen when calling centerWindowOnScreen() on onload event. It looks like
position attributes are persistent and can't be changed by this function.

Reproducible: Always

Comment 1

13 years ago
Yes, it uses persist attribute. What's wrong with that?
Component: General → Preferences
Product: Firefox → Toolkit
QA Contact: general → nobody
Version: unspecified → Trunk
(Reporter)

Comment 2

13 years ago
If a prefwindow is opened from the extension manager and also an other place
(from a browser tab for example), the persistence is incorrect: the window is
not always remembering the last position and that's confusing.
If centerWindowScreen() method could work, we could force the window to always
display at the center and avoid this annoyance. 

Comment 3

13 years ago
>If a prefwindow is opened from the extension manager [..], the persistence is 
>incorrect
I agree, but it's a problem with extension manager using 'centerscreen' feature,
right? If you wish, you could also open the window with 'centerscreen'.
centerWindowOnScreen() should work if you wrap it into a setTimeout call.
(Though I think that always displaying the window at the center, even if user
moved it manually, would be more annoying.)

Maybe it would make sense to move the persist attribute from the binding to
prefwindow instances..
(Reporter)

Comment 4

13 years ago
Yes, ok, but maybe there is a problem with this:
window.openDialog("chrome://myextension/content/options.xul","","centerscreen");

The options.xul window (which is a prefwindow) is opened but not centered and
the prefpanes are not even displayed inside the window. Can someone confirm that ?
QA Contact: nobody → preferences
You need to log in before you can comment on or make changes to this bug.