JavaScript screen.availHeight is too high

RESOLVED INACTIVE

Status

()

Core
DOM: Core & HTML
RESOLVED INACTIVE
16 years ago
a day ago

People

(Reporter: Robert Crews, Unassigned)

Tracking

Trunk
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0rc1)
Gecko/20020417
BuildID:    2002041712

Pages using the JavaScript function self.resizeTo(screen.availWidth,
screen.availHeight); make a window that is too big for the screen. The resize
handle is below the screen edge. Because new windows open with the same
dimensions as the last closed window, Mozilla essentially becomes useless.



Reproducible: Always
Steps to Reproduce:
1.View the attached test case in Mozilla for Mac OS X. You're hosed.


Actual Results:  Window is too big for the screen.

Expected Results:  Window should be the mazimum size possible, but no larger.
The window-resize handle should be easy to use.

To recover: Close this Window.
Open the "Displays" System Preference.
Set your screen resolution to 800 x 600.
Open a new Navigator window. (The window is still too high.)
Set your screen resolution to 1024 x 768. (Now it's OK.)

You might also be able to recover by opening two windows, one with usable
dimentions, and one for the test case. If you close the test case window first,
you might be able to continue working without resetting your display resolution.
(Reporter)

Comment 1

16 years ago
Created attachment 81682 [details]
HTML file with JavaScript that resizes window too big.

The text describes how to recover from this error. No lasting damage is done to
your browser or your environment or your browser. It just opens a window that
is too big to be usable.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

16 years ago
-> DOM for triage or appropriate redirection
Assignee: sgehani → jst
Component: XP Apps → DOM Level 0
QA Contact: paw → desale
Dan, want to have a look at this one? :-)
Assignee: jst → danm

Updated

16 years ago
Target Milestone: --- → mozilla1.2alpha

Comment 4

16 years ago
Changing target milestone to 'Future' since these seem to have missed the 1.2
alpha.  If you are still considering a fix for 1.2 please re-target accordingly.
Target Milestone: mozilla1.2alpha → Future

Comment 5

16 years ago
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030107

I observed something similar (I don't allow resizing). Look at the URL above. It
displays availHeight, which is in my case 768 (= screen hight, but there is a
fixed task bar). I have maximizied my window and outerHeight is only 694 which
is the real maximum possible. This does not seem to happen with Windows. Might
be a bug in all other OSes. If this is the same bug.

pi

Comment 6

14 years ago
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6b) Gecko/20031210

This bug also seems to affect the availWidth, availLeft, and availTop methods. 
You can easily see this bug in the javascript console as follows:

1.  Drag the Gnome taskbar to the bottom of the screen if it's not already there.

2.  Open the javascript console (Tools/Web Development/JavaScript Console).

3.  Click on Clear to clear any messages from the console.

4.  Type "screen.height" into the input box at the top, click on Evaluate.  The
answer should pop up and will be the same as height of your screen's resolution.

5.  Type "screen.availHeight" into the input box and click on Evaluate.  The
answer will pop up and should be approximately 70 (at a guess) less than the
previous answer to account for the task bar at the bottom of the screen, but it
will show the same answer as in step 4.

6.  Drag the taskbar over to the right side of the screen.

7.  Type "screen.width" into the input box and click on Evaluate.  The answer
should pop up and will be the same as the width of your screen's resolution.

8.  Type "screen.availWidth" into the input box and click on Evaluate.  The
answer will pop up and should be approximately 200 (at a guess) less than the
previous answer to account for the task bar on the right side of the screen, but
it will show the same answer as in step 7.

9.  Drag the taskbar to the top of the screen.

10.  Type "screen.availTop" into the input box and click on Evaluate.  The
answer will pop up and should be equal to the height in pixels of the task bar
at the top of the screen (approximately 70), but the answer will be "0" instead
which corresponds to the upper left corner of the screen.

11.  Drag the taskbar to the left side of the screen.

12.  Type "screen.availLeft" into the input box and click on Evaluate.  The
answer will pop up and should be equal to the width in pixels of the task bar on
the left side of the screen (approximately 200), but the answer will be "0"
instead which corresponds to the upper left corner of the screen.

Any chance of this bug seeing the light of day in 1.7 or 1.8?  Also if you care
about this bug please vote for it, when I found it this bug had 0 votes, but by
the looks of the comments there are at least 3 different people who are
interested in seeing this resolved.  This bug was opened almost two years ago,
it's about time to see it fixed as it can't be all that hard to fix something
this simple.

Comment 7

14 years ago
I sympathize. Sounds like a problem with nsIScreen::GetAvailRect on Mac and
Linux. I'm cutting this bug loose so someone with current access to those
platforms can pick it up.
Assignee: danm-moz → general
Severity: normal → blocker
Target Milestone: Future → ---

Comment 8

14 years ago
*** Bug 245245 has been marked as a duplicate of this bug. ***

Comment 9

14 years ago
Any chance that someone will pick up this bug in the near future?
I think caillon was working on something related to this.

Comment 11

14 years ago
Update for Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7) Gecko/20040616

The symptoms have changed now.  Following the same procedure I used below to
demonstrate the bug I get the following:

screen.width evaluates to 1024 which is correct.
screen.height evaluates to 768 which is correct.

With the taskbar at the bottom:

screen.availHeight evaluates to 736 which leaves room for a 32px high taskbar,
the taskbar is higher than that, though, and if I resize a window to 1024x736
the taskbar will overlap the bottom of the window.

screen.availWidth is 1024 and is correct.
screen.availLeft is 0 and is correct.
screen.availTop is 0 and is correct.

If I drag the taskbar to the left, the top, or the right, I get the exact same
values for all of the above.  None of the values change because of the changed
position of the taskbar.

It looks to me that someone tried to compensate for this bug by hardcoding in
what amounts to a 32px taskbar at the bottom of the screen.  The problem with
this is that the taskbar is not always at the bottom of the screen, is not
always 32px high (mine is approx 70) and is not always the only thing docked to
the side of the screen.  Even as a temporary quick fix this hardly cuts it.

Updated

12 years ago
Severity: blocker → normal
Assignee: general → nobody
QA Contact: desale → general

Comment 12

a day ago
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: a day ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.