Open Bug 311584 Opened 19 years ago Updated 2 years ago

centerWindowOnScreen() is not working with <prefwindow> windows

Categories

(Toolkit :: Preferences, defect)

x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: laebcontact, Unassigned)

Details

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
Yes, it uses persist attribute. What's wrong with that?
Component: General → Preferences
Product: Firefox → Toolkit
QA Contact: general → nobody
Version: unspecified → Trunk
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. 
>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..
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
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.