mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Deleting a specific style name float for ie8 (#9311)
* Deleting a specific style name float for ie8 * Remove unnecessary condition
This commit is contained in:
committed by
Dan Abramov
parent
6fd539ec66
commit
d9915db43b
@@ -30,7 +30,6 @@ var processStyleName = memoizeStringOnly(function(styleName) {
|
||||
});
|
||||
|
||||
var hasShorthandPropertyBug = false;
|
||||
var styleFloatAccessor = 'cssFloat';
|
||||
if (ExecutionEnvironment.canUseDOM) {
|
||||
var tempStyle = document.createElement('div').style;
|
||||
try {
|
||||
@@ -39,10 +38,6 @@ if (ExecutionEnvironment.canUseDOM) {
|
||||
} catch (e) {
|
||||
hasShorthandPropertyBug = true;
|
||||
}
|
||||
// IE8 only supports accessing cssFloat (standard) as styleFloat
|
||||
if (document.documentElement.style.cssFloat === undefined) {
|
||||
styleFloatAccessor = 'styleFloat';
|
||||
}
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
@@ -215,8 +210,8 @@ var CSSPropertyOperations = {
|
||||
styles[styleName],
|
||||
component,
|
||||
);
|
||||
if (styleName === 'float' || styleName === 'cssFloat') {
|
||||
styleName = styleFloatAccessor;
|
||||
if (styleName === 'float') {
|
||||
styleName = 'cssFloat';
|
||||
}
|
||||
if (styleValue) {
|
||||
style[styleName] = styleValue;
|
||||
|
||||
Reference in New Issue
Block a user