Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15784 closed defect (invalid)

dojo/dom-style won't change background-image for firefox or opera, but works in chrome and safari

Reported by: Jacqui Manzi Owned by: Jacqui Manzi
Priority: undecided Milestone: tbd
Component: HTML Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description

using: dojo/dom-style and dojo/_base/sniff

Sample code:

domStyle.set("appBarContainer", "background-image", gradient);

This will change the background image to my gradient string in Chrome and Safari, but will not change the gradient in Firefox or Opera. I am using dojo/has to sniff for the browser type and then giving the gradient variable the appropriate css3 gradient string (webkit, moz, etc..).

Version of Firefox I am using is: 14 and Opera 11.61

Change History (5)

comment:1 Changed 7 years ago by Kitson Kelly

Owner: set to Jacqui Manzi
Status: newpending

Can you provide a complete working example and attach it to the ticket?

comment:2 Changed 7 years ago by Kitson Kelly

Component: GeneralCore

comment:3 Changed 7 years ago by freddefisk

You should use "backgroundImage" rather than "background-image".

See http://www.w3schools.com/jsref/dom_obj_style.asp for more info.

comment:4 Changed 7 years ago by bill

Component: CoreHTML
Resolution: invalid
Status: pendingclosed

comment:5 in reply to:  3 Changed 7 years ago by Jacqui Manzi

Replying to freddefisk:

You should use "backgroundImage" rather than "background-image".

See http://www.w3schools.com/jsref/dom_obj_style.asp for more info.

Oh, whoops.

Thank you and sorry about that!

Note: See TracTickets for help on using tickets.