Closed Bug 601190 Opened 15 years ago Closed 15 years ago

-moz-transition of opacity doesn't work properly when going from display:none to display:inline at the same time

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 537143

People

(Reporter: avi3k3, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0b7pre) Gecko/20101001 Firefox/4.0b7pre Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b7pre) Gecko/20101001 Firefox/4.0b7pre if you use -moz-transition with nested elements doesn't work in certain conditions, example: <!DOCTYPE html> <html> <head> <title>ff</title> <style type="text/css"> <!-- a img { display: none; opacity: 0.2; -moz-transition: opacity 0.5s ease-in-out; -webkit-transition: opacity 0.5s ease-in-out; -o-transition: opacity 0.5s ease-in-out; transition: opacity 0.5s ease-in-out; } a:hover img { display: inline; opacity: 1; } --> </style> </head> <body> <a href="#">testing an img <img src="http://sfx-images.mozilla.org/firefox/3.6/80x15_blue.png" alt="ff" /></a> </body> </html> while using visible property, this works ok, but with display property, sometimes the image appears without the -moz-transition taking affect. in more complex code ff might show the element completely and then start the transition (almost hide the element then show it again) instead. i've also checked latest trunk on Linux (Ubuntu 10.04) and the behavior is similar. Reproducible: Sometimes Steps to Reproduce: 1. copy/paste the above HTML to file 2. open saved file in ff 4 Expected Results: as described in the specification http://www.w3.org/TR/css3-transitions/#the-transition-property-property- ff should continue with the animation on properties listed in -moz-transition-property and keep other properties (like display) according to the css specs
this is another more complex example of the bug based on the menu from http://cssmenumaker.com/builder/menu_info.php?menu=005 with added transition. ff sometimes shows the menu immediately and might also hide the menu and reshow it with the transition. changing the display property to visibility in the right places causes the menu to work correctly on ff. (fyi, currently opera is the only browser to properly show the menu when using the display property)
Yeah, I see this.... I wonder what it is about going from undisplayed to displayed that triggers the issue.
Status: UNCONFIRMED → NEW
Ever confirmed: true
The issue is not the nesting, btw; it's the display change. Is the issue that we start transitions on changes to a _frame's_ style context and we don't have a frame before the style change?
Summary: -moz-transition doesn't work properly in nested elements → -moz-transition of opacity doesn't work properly when going from display:none to display:inline at the same time
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: