Closed Bug 510185 Opened 15 years ago Closed 10 years ago

Window is moved around the screen in a random manner using javascript. Page cannot be closed.

Categories

(Firefox :: General, defect)

3.5 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ion_daniel2000, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 2.0.50727; .NET CLR 3.0.30618; .NET CLR 3.5.21022; .NET CLR 3.5.30729) FirePHP/0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 2.0.50727; .NET CLR 3.0.30618; .NET CLR 3.5.21022; .NET CLR 3.5.30729) FirePHP/0.3 Window is moved around the screen in a random manner using javascript. The window cannot be closed. Firefox has to be closed using Task Manager. Reproducible: Always Steps to Reproduce: 1.Go to http://ratati.org. "Rataţi" is a romanian word that means loosers. Curiosity seems to make you a looser sometime :). Actual Results: The window begins to move randomly on the screen making it very difficult to close. If you are really quick and manage to press the close button a series of annoying pop-ups appears. The pop-ups displays the message "Ratatule", which means "You are a losser" of course :). Expected Results: Chrome (3.0.197.11) behave as expected. The window stay still. When you close the window, the alert box "Ratatule" appears only once. After you press OK button, the next alert box "Ratatule" has a checkbox that say "Prevent this page to create additional dialog". If you check the page checkbox and press OK button the page is closed. A little code snipped from the source code of the page. neva = "RATATULE!\n\ RATATULE!\n\ RATATULE!\n\ RATATULE!\n\ .... RATATULE!"; if(window.opera){ window.onkeydown = function(e){ if(e.keyCode != 18 && e.keyCode != 27 && e.keyCode != 32 && e.keyCode != 115){ if(Math.random() > .5) for(var i = 0; i < 35; i++) document.getElementById('roll').Back(); else for(var i = 0; i < 53; i++) document.getElementById('roll').Forward(); document.getElementById('roll').Play(); } else if(e.keyCode == 115){ for(x in neva.split('\n')){ alert(neva.split('\n')[x]); } } return false; } }else{ window.onkeydown = function(e){ if(e.keyCode != 13 && e.keyCode != 27 && e.keyCode != 32){ if(Math.random() > .5) for(var i = 0; i < 35; i++) document.getElementById('roll').Back(); else for(var i = 0; i < 53; i++) document.getElementById('roll').Forward(); document.getElementById('roll').Play(); } return false; } } /* document.onkeydown = function(){ for(var i = 0; i < 35; i++) document.getElementById('roll').Back(); document.getElementById('roll').Play(); return false; } */ window.resizeTo(640,600); window.moveTo(0,0); for (i = 1; i <= 800; i++){ setTimeout('window.moveTo(1599,1199);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,0);', i+"000"); } ... <body onbeforeunload="for(x in neva.split('\n')){ alert(neva.split('\n')[x]); } return false;">
Severity: critical → normal
Maybe a duplicate of / related to Bug 61098 ?
Version: unspecified → 3.5 Branch
Actually, there are two bugs described here: 1. A script can move the window randomly on the screen making it very difficult to the user to close the window. Google Chrome browser does not allow that. 2. The user cannot close the page because a loop which throws modal dialog boxes prevent that. Yes, I think this second part is a duplicate of/related to Bug 61098
And dom.disable_window_move_resize to true does not change that? http://kb.mozillazine.org/About:config You can also find the preference as an option in Tools > Options > Content > Javascript > Advanced
Yes it does. Thanks for the tips! The window does not move anymore. Maybe the dom.disable_window_move_resize should be set by default to false? It will stop such kind of stupid jokes and I don't think it will be a great loss looking from a user's perspective.
My proposal for the resize issue is in bug 502561. I'm curious what Chrome's heuristic is.
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode or a fresh profile? If not, please close. These links can help you in your testing. http://support.mozilla.com/kb/Safe+Mode http://support.mozilla.com/kb/Managing+profiles
Whiteboard: [CLOSEME 2011-2-25]
Attached file test page
Test page
I tested with Firefox 3.6.13 (fresh profile) and Firefox 4.0b11 (Windows 7) 1. A script can move the window randomly on the screen making it very difficult to the user to close the window. Google Chrome browser does not allow that. NOT FIXED 2. The user cannot close the page because a loop which throws modal dialog boxes prevent that. Yes, I think this second part is a duplicate of/related to Bug 61098 Firefox 3.16.13 NOT FIXED Firefox 4.0b11 FIXED
Whiteboard: [CLOSEME 2011-2-25]
Testcase WFM in FF 37a. dom.disable_window_move_resize protects against movement, and repeated alert protection is active by default.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Fixing bug 391834 helped too.
Blocks: eviltraps
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: