Closed
Bug 165704
Opened 23 years ago
Closed 23 years ago
missing onmouseouts and spurious onload events on changing image opacity. moz-opacity mozopacity
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 142004
People
(Reporter: stephen, Assigned: jst)
References
()
Details
Changing image moz-opacity to 1, or from 1 to any other value causes an image
reload event which in some way resets the mouseover status so that subsequent
mouse-outs are not generated.
See the test case URL:
Setting opacity from 0 up to 0.99 is OK - try this:
1. Initial opacity=0.4
2. mouse-over the image until it's 'faded' up to 0.99.
3. Mouse-out and it 'fades' down to opacity 0.
Working Fine. As expected.
Setting opacity to or from 1 causes problems:
1. Reload the page (or press 'reset')
2. Initial opacity=0.4
3. Set the 'max' opacity to 1 in the textbox
4. mouse-over the image until it's 'faded' up to 1 - see the "load event
opacity=1" load event when it reaches 1 (?error - probably functionally an error).
4. Mouse-out - NO mouse out event is generated (ERROR).
5. Mouse back-in - opacity changed from 1 to 1 (no change)
6. Mouse back out - Mouse-out generated, and when opacity set from 1 to a lower
value a new reload event is produced (again ?error)
Other comments:
You get an Image Onload event if you programatically set moz-opacity if it is
not already set with a 0 to 1 float on the initial image style.
You get an Image onload event of you set the moz-opacity %age/resetting the
style using setAttribute("style","-moz-opacity: n%;") (not a good idea anyway!)
You can't set Opacity in scripts by "%" unless you redo the entire style (as in
the line above)
![]() |
||
Comment 1•23 years ago
|
||
%-opacity should not be used and will probably not be supported at some time in
the future (once someone gets around to removing it). The rest of this bug is
due to the reframe that happens when opacity changes to/from 1.
*** This bug has been marked as a duplicate of 142004 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•