Closed Bug 228152 Opened 21 years ago Closed 20 years ago

window open Observer close

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

()

RESOLVED INVALID

People

(Reporter: patzerrene, Assigned: bugzilla)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://browser/content/browser.js :: Shutdown :: line 445"  data: no]



I made a script which opens a new window when the mouse is over some area of a
imagemap.
This window is to be closed,when the mouse leaves that area.


Reproducible: Sometimes

Steps to Reproduce:
1. move mouse over the area of that specific imagemap
2. leave that specific area
3. make this a few times but much faster

Actual Results:  
the window doesnt get closed (cumulative)

Expected Results:  
close the opened window

here is the code (comments are in german)

<code/>

var Fenster

function Sponsor(name) {
	closeSponsorWindow() // Kann ja mal vorkommen,dass der Browser was nich kapiert
an Funktion closeSp... aufrufen :)

	var picwidth = 150 //festgelegt und die Bilder sind darauf angepasst
	var picheight = 80 // festgelegt und die Bilder sond darauf angepasst
	var WindowWidth = 250

	var xPos = 100;
	var yPos = 10;
	// Wenn das Bild schmaler ist,wie die Standardgröße,müssen wir das Fenster anpassen
	var Width = picwidth < WindowWidth ? WindowWidth : picwidth + 45;
	var Height = picheight+90;
	
	Fenster = window.open("","_blank","height=" +Height + ",width=" + Width +
"status=no,location=no,menubar=no,scrollbars=no,resizable=no")
	Fenster.moveTo(xPos,yPos)
	Fenster.document.writeln('<html>')
	Fenster.document.writeln('<head>')
	Fenster.document.writeln('<title>')
	Fenster.document.writeln('	Einer unserer Sponsoren')
	Fenster.document.writeln('</title>')
	Fenster.document.writeln('	<link rel="stylesheet" type="text/css"
href="css/formate.css">')
	Fenster.document.writeln('	<link rel="stylesheet" type="text/css"
href="css/inhalt.css">')
	Fenster.document.writeln('</head>')
	Fenster.document.writeln('<body>')
	Fenster.document.writeln('<table width="99%" height="100%" border="1"
id="TabellenRand">')

	// Wenn das Bild schmaler ist,wollen wir es zentriert haben
	var trBegin = picwidth < WindowWidth ? '<tr width="100%">' : '<tr>'

	Fenster.document.writeln(trBegin)
	Fenster.document.writeln('	<td align="center" height="100%" valign="center">')
	Fenster.document.writeln('	<img src="bilder/sponsoren/' +name+ '" width="' +
picwidth + '" height="'+picheight+'" alt="Einer unserer Sponsoren">')
	Fenster.document.writeln('	</td>')
	Fenster.document.writeln('</tr>')
	Fenster.document.writeln('</table>')
	Fenster.document.writeln('</body>')
}

function closeSponsorWindow() {
	if(Fenster)
	{
		Fenster.close();
	}
}
René Patzer, can you please attach a complete testcase or point to a URL where
the problem can be reproduced? Without more information, this bug isn't
particularly helpful. Thanks.
Build is too old to be of use.  Please try to reproduce this bug on FF 0.9 or a
nightly.

Thanks
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
In this ZIP-File i included the necessary html,js,jpg and css-files needed to
demonstrate that bug.

Just open sponsoren.html and move your mouse-cursor over the ball.
You'll see a small window pop-up.
Now move your mouse over another spot of the ball and the previous window
should close and another should open.

Move your mouse very quick over the different spots on the ball and you'll see
that some of the pop-up's won't close automatically, though there is a script
which shoud handle this.

The script uses a global var for accomplishing this, but it seems to loose
track of the content of that var.

Thx
Tested again on:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9
Whoops,forgot this:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://browser/content/browser.js :: Shutdown :: line 474"  data: no]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: