availHeight/Width in Opera

S

Severus Snape

I've noticed that screen.availHeight/availWidth don't return
correct results in Opera 8, meaning that what Opera returns are
the pure screen dimensions, no the actual dimensions due to
taskbars or similar. On the other hand other browsers (MSIE,
Netscape, Mozilla) get this correct.
Anybody knows of a workaround?

Thanks.
 
R

Richard Cornford

Severus said:
I've noticed that screen.availHeight/availWidth don't
return correct results in Opera 8, meaning that what
Opera returns are the pure screen dimensions, no the
actual dimensions due to taskbars or similar.

That would represent a regression as Opera 7.23 certainly did return
availHeight/Width dimensions that took the taskbar into account, but
earlier versions did not. Not that it matters much as screen dimensions
have little to do with anything, and never could be expected to be an
accurate source of information (particularly on multi-monitor
configurations).
On the other hand other browsers (MSIE, Netscape, Mozilla)
get this correct.

When you are dealing with aspects of a browser DOM that is not covered
by public specifications there is no criteria for 'correct'. Browsers
have always differed in their interpretation of screen dimensions, and
they still do.
Anybody knows of a workaround?

Design out all need to be interested in the screen dimensions.

Richard.
 
L

Lasse Reichstein Nielsen

Severus Snape said:
I've noticed that screen.availHeight/availWidth don't return
correct results in Opera 8, meaning that what Opera returns are
the pure screen dimensions, no the actual dimensions due to
taskbars or similar.

In my Opera 8, build 7561, screen.availHeight gives me 1170, which is
correct (and the same value that IE gives). What exact build are you
using and what code are you using to find screen.availHeight? And are
you running in MDI or SDI mode? Do you have any user.js code installed?

(and what do you need the screen size for anyway? :)

/L
 
S

Severus Snape

Lasse said:
In my Opera 8, build 7561, screen.availHeight gives me 1170, which is
correct (and the same value that IE gives). What exact build are you
using and what code are you using to find screen.availHeight? And are
you running in MDI or SDI mode? Do you have any user.js code installed?

I must partially rectify what I said.
The incorrect behaviour occured with Opera 8.0 build 1095 under FreeBSD.
I then tried with Opera 8.0 build 7561 under Windows and it worked all
right.
Perhaps it's just something about freebsd, even though the other browser
I tried worked ok (mozilla, konqueror).
(and what do you need the screen size for anyway? :)

/L

Well, to tell the truth I'm trying to build a minimal javascript
object-oriented, agent-indipendent library for most common browser
oparations. The screen size comes into play when I want to open a
window to maximum dimension. As you know, only MSIE supports the
fullscreen attribute, so if you want to do the same under`other browsers
you have to manually set the dimensions to the screen size.

Bye.
 
D

DU

Severus said:
I've noticed that screen.availHeight/availWidth don't return
correct results in Opera 8, meaning that what Opera returns are
the pure screen dimensions, no the actual dimensions due to
taskbars or similar.


screen.availHeight/availWidth are not updated in real time in Opera 8.
Besides that issue, Opera 8 reports accordingly
screen.availHeight/availWidth property values. Opera 8.01 build 7624 here.

DU
 
D

DU

Richard said:
That would represent a regression as Opera 7.23 certainly did return
availHeight/Width dimensions that took the taskbar into account, but
earlier versions did not. Not that it matters much as screen dimensions
have little to do with anything, and never could be expected to be an
accurate source of information (particularly on multi-monitor
configurations).




When you are dealing with aspects of a browser DOM that is not covered
by public specifications there is no criteria for 'correct'. Browsers
have always differed in their interpretation of screen dimensions, and
they still do.

Generally speaking, I'd say they agree rather than they differ. In a
majority of cases, they do agree; in a minority of cases, they differ.
Design out all need to be interested in the screen dimensions.

Richard.

I think this sort of response should be underlined, repeated and
explained more often. screen properties (and window related-measurements
properties) are pretty much useless. Designing with screen (and window
related-measurements) properties goes against flexible, scalable webpage
design, goes against interoperability on different media and web-aware
devices.

DU
 
L

Lasse Reichstein Nielsen

Severus Snape said:
The screen size comes into play when I want to open a window to
maximum dimension.

Even with the screen dimension known, Opera in MDI mode will not allow
a full screen window (well, the window is there, you just can't see
any more of it than the size of the Opera main application window :).
As you know, only MSIE supports the fullscreen attribute, so if you
want to do the same under`other browsers you have to manually set
the dimensions to the screen size.

Seems that's one of the functionalities that won't work on all
browsers (and I'm quite happy my Opera won't allow it ... bloody
pages better stay where I say they can go, or its closing time :).

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top