Closed Bug 573880 Opened 12 years ago Closed 12 years ago

border-radius and -moz-border-radius are not settable from javascript

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: donrhummy, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

I am unable to set these styles in javascript. All of the following do not change the element:

[code]
el.style.borderRadius = "4px";
el.style[ "border-radius" ] = "4px";
el.style.mozBorderRadius = "4px";
el.style[ "-moz-border-radius" ] = "4px";
[/code]

Reproducible: Always

Steps to Reproduce:
1. Try setting border radius in javascript
2.
3.
Actual Results:  
nothing happens

Expected Results:  
It would apply the styles
Assignee: general → nobody
Component: JavaScript Engine → DOM: CSS Object Model
QA Contact: general → general
> el.style.mozBorderRadius = "4px";

-moz-* CSS properties are reflected into CSS2Properties as Moz* (so in this case .style.MozBorderRadius).

You can also, of course, use .style.setProperty("-moz-border-radius", "value", ""), which takes the same property names as the parser does.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.