Permalink
Browse files

Merge pull request JedWatson#1265 from strayiker/master

IE8 compatibility fixes
  • Loading branch information...
JedWatson committed Oct 1, 2016
2 parents 0b36224 + f9039c7 commit b3db918420a5b4d316cd75b1a98b35a5a3961981
Showing with 16 additions and 4 deletions.
  1. +16 −4 src/Select.js
View
@@ -236,14 +236,26 @@ const Select = React.createClass({
},
componentWillUnmount() {
document.removeEventListener('touchstart', this.handleTouchOutside);
if (!document.removeEventListener && document.detachEvent) {
document.detachEvent('ontouchstart', this.handleTouchOutside);
} else {
document.removeEventListener('touchstart', this.handleTouchOutside);
}
},
toggleTouchOutsideEvent(enabled) {
if (enabled) {
document.addEventListener('touchstart', this.handleTouchOutside);
if (!document.addEventListener && document.attachEvent) {
document.attachEvent('ontouchstart', this.handleTouchOutside);
} else {
document.addEventListener('touchstart', this.handleTouchOutside);
}
} else {
document.removeEventListener('touchstart', this.handleTouchOutside);
if (!document.removeEventListener && document.detachEvent) {
document.detachEvent('ontouchstart', this.handleTouchOutside);
} else {
document.removeEventListener('touchstart', this.handleTouchOutside);
}
}
},
@@ -857,7 +869,7 @@ const Select = React.createClass({
if (this.props.autosize) {
return (
<AutosizeInput {...inputProps} minWidth="5px" />
<AutosizeInput {...inputProps} minWidth="5" />
);
}
return (

0 comments on commit b3db918

Please sign in to comment.