Skip to content

Commit

Permalink
Merge pull request #3 from zlumyo/master
Browse files Browse the repository at this point in the history
Added hack to support search mode in IE11
  • Loading branch information
maslianok authored Feb 2, 2017
2 parents 8e961ba + 9756b14 commit fa79d37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ReactSelectMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ export default class ReactSelectMe extends PureComponent {
onFocus={this.onSearch}
onClick={this.onSearch}
onPaste={this.onSearch}
onKeyUp={this.onSearch}
ref={e => (this.searchInput = e)}
/>
);
Expand Down Expand Up @@ -501,7 +502,9 @@ export default class ReactSelectMe extends PureComponent {
}

onSearch = (evt) => {
if (!this.searchInput) {
// `document.documentMode` isn't undefined in IE only.
// See more https://msdn.microsoft.com/library/cc196988(v=vs.85).aspx
if (!this.searchInput || (evt.type === 'keyup' && !document.documentMode)) {
return;
}

Expand Down Expand Up @@ -568,6 +571,7 @@ export default class ReactSelectMe extends PureComponent {
}
break;
case 'input':
case 'keyup':
doSearch();
break;
default:
Expand Down

0 comments on commit fa79d37

Please sign in to comment.