resizeTo not working in Opera 9.64

G

Gabriel Gilini

Hi, this is actually a DOM thing, so if I shouldn't post here, please
tell me.

Well, first of all, I've never used window.open() and resizeTo before,
so I could be missing something obvious. The reason that I'm using
this functions is to create a test case, to test a function that
returns the visible part of the screen dimensions.

So, here's the test page I've written to reproduce the problem:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<script type="text/javascript">
window.onload = function(){
window.resizeTo(400, 400);

var newWin = window.open();
newWin.resizeTo(400, 400);
}
</script>
</head>
<body>
</body>
</html>

I'm on linux, and as the subject says, Opera's version is 9.64.

It works fine in Konqueror 3.5.10 and Firefox 3.0.8. Opera's new
window just stands still and doesn't throw errors or anything.

Any idea of what could this be? I'd also appreciate if you guys could
share how you test a function similar to the one I'm trying to test.
 
B

BootNic

On Thu, 30 Apr 2009 16:28:10 -0700 (PDT)
<[email protected]>

[snip]

Subject: resizeTo not working in Opera 9.64
I'm on linux, and as the subject says, Opera's version is
9.64.

It works fine in Konqueror 3.5.10 and Firefox 3.0.8. Opera's
new window just stands still and doesn't throw errors or
anything.

Any idea of what could this be? I'd also appreciate if you
guys could share how you test a function similar to the one I'm
trying to test.

Opera javascript options:

• Allow resizing of windows

• Allow moving of windows

• Allow raising of windows

• Allow lowering of windows

• Allow Changind of status field

• Allow scripts to receive right clicks

• Allow script to hide address bar

It is likely that resizing of windows in opera is not enabled.

--
BootNic Thu Apr 30, 2009 07:41 pm
A person without a sense of humor is like a wagon without springs,
jolted by every pebble in the road.
*Henry Ward Beecher*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)

iEYEARECAAYFAkn6N0cACgkQylMUzZO6jeKu5wCgv9YDjTLcEnlt8D8ieSIm1VOi
o80AnRDfvAH6ZtntcSsUqHtTS+KHtNOl
=ZWth
-----END PGP SIGNATURE-----
 
G

Gabriel Gilini

It is likely that resizing of windows in opera is not enabled.

Yes, it is. And AFAIK, this options only affect windows not opened via
window.open. Those can always be resized.
 
G

Gabriel Gilini

Hi, this is actually a DOM thing, so if I shouldn't post here, please
tell me.

Well, first of all, I've never used window.open() and resizeTo before,
so I could be missing something obvious. The reason that I'm using
this functions is to create a test case, to test a function that
returns the visible part of the screen dimensions.

So, here's the test page I've written to reproduce the problem:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
  <script type="text/javascript">
    window.onload = function(){
      window.resizeTo(400, 400);

      var newWin = window.open();
      newWin.resizeTo(400, 400);
    }
  </script>
</head>
<body>
</body>
</html>

I'm on linux, and as the subject says, Opera's version is 9.64.

It works fine in Konqueror 3.5.10 and Firefox 3.0.8. Opera's new
window just stands still and doesn't throw errors or anything.

Any idea of what could this be? I'd also appreciate if you guys could
share how you test a function similar to the one I'm trying to test.

Ok, all of a sudden it just worked on Opera. I didn't change any
settings or anything, so I'm still trying to figure out what has
changed.

I'd still like to know you thoughts on unit testing functions that get
elements positioning in viewport, offsets and stuff like that.

Cheers
 
S

SAM

Le 5/1/09 1:28 AM, Gabriel Gilini a écrit :
Well, first of all, I've never used window.open() and resizeTo before,

Windows popups are old to date.
Most of users and navigators reject them.
It is not to twist them more in all directions ;-)
so I could be missing something obvious. The reason that I'm using
this functions is to create a test case, to test a function that
returns the visible part of the screen dimensions.

function report(txt) {
var p = document.createElement('P');
p.innerHTML = txt;
var i = document.getElementById('info');
if(i) document.body.replaceChild(p,i);
else document.body.appendChild(p);
p.id = 'info';
}

report('screen width = '+ screen.availWidth +
' - screen height = '+ screen.availHeight);
<script type="text/javascript">
window.onload = function(){
window.resizeTo(400, 400);

var newWin = window.open();
newWin.resizeTo(400, 400);
}
</script>
I'm on linux, and as the subject says, Opera's version is 9.64.
It works fine in Konqueror 3.5.10 and Firefox 3.0.8.

Not in all cases in Firefox.
See its preferences: tab 'Contents' button 'Advanced'
Opera's new
window just stands still and doesn't throw errors or anything.

As with Firefox, it is to the user to allow windows resizing or/and
repositioning.

About dimensions :
<http://www.quirksmode.org/dom/tests/elementdimensions.html>
<http://www.quirksmode.org/dom/w3c_cssom.html>
 
B

BootNic

On Thu, 30 Apr 2009 16:50:56 -0700 (PDT)
Yes, it is. And AFAIK, this options only affect windows not opened via
window.open. Those can always be resized.

Interesting. I suppose my opera must be broken if that is the way it
works.

Perhaps there are other settings I have forgotten about. I will watch
the thread for a few days to see if a solution is found so I can
find a way to disable it in my opera.

Good luck.

--
BootNic Thu Apr 30, 2009 08:41 pm
If you can learn from hard knocks, you can also learn from soft
touches.
*Carolyn Kenmore*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)

iEYEARECAAYFAkn6RTwACgkQylMUzZO6jeJYzgCglswl2PaRcwLz/O0kC4rkMIHC
9jwAmwcJNMxls/x1cY0JBCNfCh+RBqSO
=JQj+
-----END PGP SIGNATURE-----
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top