Closed Bug 36202 Opened 24 years ago Closed 24 years ago

Events lost after applying style dynamically

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Windows 2000
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: rsalesas, Assigned: pierre)

Details

Attachments

(1 file)

The following code changes the style of the text on mousing over and out. The 
code works the first time, but on leaving the element the style does not 
change. Seems like the "onmouseout" event is being lost when the first style is 
set.

===========

<html>
<head>
<style>
.enabledButtonColor{color:blue}
.disabledButtonColor{color:#c0c0c0}
.hoverButtonColor{color:red}
</style>
<script>
	function doMouseOver(name, flag) {
		if(flag == null || flag){
			obj = document.getElementById(name)
			obj.className = "hoverButtonColor"
		}
	}

	function doMouseOut(name, flag) {
		if(flag == null || flag){
			obj = document.getElementById(name)
			obj.className = "enabledButtonColor"
		}
	}


</script>
</head>
<body>
	<a id="purge"  onmouseover="doMouseOver('purge')" onmouseout="doMouseOut
('purge')">Purge</a>				
</body>
</html>
updating component and owner.  Going to style system first.  this may be a 
layout issue though.
Assignee: asadotzler → pierre
Component: Browser-General → Style System
QA Contact: jelwell → chrisd
Reproduced on PC/Linux with M14. M15 and 2000042809 work fine.
Marking WORKSFORME.

rsalesas@responselab.com: Please include your milestone number or build ID in
future bug reports (something like M15 or 2000042809 in the lower right corner
of the browser window). The Bug Helper at
	http://www.mozilla.org/quality/help/bug-form.html 
tries to help avoiding problems like this.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
verified using 2000071720 nightly build on w2k
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: