Skip to content

Commit d9915db

Browse files
Tom910gaearon
authored andcommitted
Deleting a specific style name float for ie8 (#9311)
* Deleting a specific style name float for ie8 * Remove unnecessary condition
1 parent 6fd539e commit d9915db

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/renderers/dom/shared/CSSPropertyOperations.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ var processStyleName = memoizeStringOnly(function(styleName) {
3030
});
3131

3232
var hasShorthandPropertyBug = false;
33-
var styleFloatAccessor = 'cssFloat';
3433
if (ExecutionEnvironment.canUseDOM) {
3534
var tempStyle = document.createElement('div').style;
3635
try {
@@ -39,10 +38,6 @@ if (ExecutionEnvironment.canUseDOM) {
3938
} catch (e) {
4039
hasShorthandPropertyBug = true;
4140
}
42-
// IE8 only supports accessing cssFloat (standard) as styleFloat
43-
if (document.documentElement.style.cssFloat === undefined) {
44-
styleFloatAccessor = 'styleFloat';
45-
}
4641
}
4742

4843
if (__DEV__) {
@@ -215,8 +210,8 @@ var CSSPropertyOperations = {
215210
styles[styleName],
216211
component,
217212
);
218-
if (styleName === 'float' || styleName === 'cssFloat') {
219-
styleName = styleFloatAccessor;
213+
if (styleName === 'float') {
214+
styleName = 'cssFloat';
220215
}
221216
if (styleValue) {
222217
style[styleName] = styleValue;

0 commit comments

Comments
 (0)