#6399 closed defect (fixed)
dojox.fx.highlight tests fail on Safari
Reported by: | guest | Owned by: | nic |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dojox | Version: | 1.1.0 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
Instead of fading to the background colour of the object, everything fades to black, then snaps to the correct colour.
This is Safari Version 3.1 (4525.13) on OS X 10.4.11 with Dojo 1.1.0
The test is dojox/fx/tests/test_highlight.html
Attachments (3)
Change History (18)
Changed 13 years ago by
Attachment: | Picture 4.png added |
---|
comment:1 Changed 13 years ago by
Milestone: | → 1.2 |
---|---|
Owner: | changed from Bryan Forbes to dante |
Status: | new → assigned |
comment:2 Changed 13 years ago by
Component: | fx → Dojox |
---|
comment:3 Changed 13 years ago by
Milestone: | 1.2 → 1.4 |
---|
So I've determined what this is, but want to blame dojo.Color somehow -- though can't figure out where why. Both safari and FF3 report the endColor as being rgba(0,0,0,0), IE7 calls it "transparent", both cases are being checked for already, so the color animation used in safari isn't reading the 0 opacity, and animating to black ( rga(0,0,0) ) ... The internal onEnd handler is setting it back properly, which is why it "works", but yes, is horribly wrong to be going towards black here.
bumping to see if anything else can be determined in core Color class, or perhaps it's even in animateProperty.
comment:4 Changed 13 years ago by
comment:5 Changed 12 years ago by
It's not a safari related problem: FF3 reports "transparent" for endColor, safari rgba(0, 0, 0, 0): new dojo.Color("transparent") returns rgba(255, 255, 255, 1), new dojo.Color("rgba(0, 0, 0, 0)") returns rgba(0, 0, 0, 0).
So, FF3 maps transparent to white (and opacity = 1, the default dojo.Color value), safari to black: if you put a black background on your page, FF3 seems to be wrong, not safari.
Finally, animateProperty to an endColor rgba(0, 0, 0, 0) fails in both FF3 and safari, the "opacity" is not properly set (but dojo.style works!)
comment:6 Changed 12 years ago by
The patch fixes the test page, assuming "transparent" == "white" on safari too.
Changed 12 years ago by
Attachment: | _base.js.diff added |
---|
Changed 12 years ago by
Attachment: | color.patch added |
---|
comment:7 Changed 12 years ago by
Added a "transparentColor" property to djConfig (eg [255,0,0] maps the "transparent" dojo.Color to red; white is the default)
comment:8 Changed 12 years ago by
Owner: | changed from dante to nic |
---|---|
Status: | assigned → new |
comment:9 Changed 12 years ago by
Status: | new → assigned |
---|
comment:10 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:11 Changed 10 years ago by
comment:12 Changed 9 years ago by
What's the deal with this ticket? This behaviour still seems broken.
I posted on dojo-interest with a link to http://dojo-sandbox.net/public/f4991/0 demonstrating the problem, at least in Chrome. This bug is marked 'fixed', is this a different problem? Should I open a new ticket? I have no 'reopen ticket' option below.
comment:13 Changed 9 years ago by
Well, according to this ticket you need to set dojo.config.transparentColor to the appropriate color for your page. Your test case isn't doing that, right? I don't know why the code can't just query the background color of the object itself though.
comment:14 Changed 9 years ago by
PS: I guess this is partly due to my [25750] change, but anyway, looks like (short of changing dojox.fx.highlight to automatically figure out the background-color of the object), you need to specify dojo.config.transparentColor.
comment:15 Changed 9 years ago by
@bill ah, you're right, I'm not doing that. I had read that the transparentColor needed was set in one case, in a comment above, but didn't realise that this is required in any page trying to use this behaviour.
This seems one of those very rare cases when dojo needs pre-configuring something, like dojoBlankHtmlUrl. It's not mentioned at all that I can see in the docs http://dojotoolkit.org/reference-guide/1.7/dojox/fx.html
It seems surprising to me, in this day and age of alpha transparencies, that we should have to specify what the 'transparent' colour is .. surely we're not actually using transparency, we're just defining a solid colour that happens to match the background.
So I specify transparentColor: [255,255,255] in my djConfig, as in http://dojo-sandbox.net/public/f4991/1 and it seems to work.. the changeset http://bugs.dojotoolkit.org/changeset/18795/dojo claims that [255,255,255] is the default yet leaving it out left me with an ugly fade-to-black effect.
I'll look at commenting in the docs that transparentColor must be defined for dojox.fx.highlight to work reliably.
After fading from yellow to black (as seen here), the bgcolor snaps back to the correct colour.