Events lost after applying style dynamically

VERIFIED WORKSFORME

Status

()

Core
CSS Parsing and Computation
P3
normal
VERIFIED WORKSFORME
18 years ago
18 years ago

People

(Reporter: rsalesas, Assigned: Pierre Saslawsky)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
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>

Comment 1

18 years ago
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

Comment 2

18 years ago
Created attachment 8132 [details]
bug reporter's html test document

Comment 3

18 years ago
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
Last Resolved: 18 years ago
Resolution: --- → WORKSFORME

Comment 4

18 years ago
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.