Famous / Famous/famous

Surface._applyStyles broken in firefox

Open
#578 4 comments 0 reactions 0 assignees View on GitHub
vendor bug
Dominant language
JavaScript
Stars
6.2k
Forks
670
PR merge metrics
No merged PRs in 30d

Description

`target.style[n] = this.properties[n];` is currently used to set the css styles in `Surface.js`.

this works fine when camel case is used (ie. `boxShadow`) but does not work in firefox when actual css property name is used (ie. `box-shadow`).

looks like a firefox issue.

element.style returns a `CSS2Properties` object which has css properties mapped by their camel case names, and key names 0 to N for the number of css properties actually set (so the browser can iterate over style.length). this is true for both chrome and firefox.

but in chrome, doing `element.style['box-shadow'] = '0 0 1px 1px red'` increases N, and adds an entry for `box-shadow`, while firefox does not unless you use `boxShadow`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.