Skip to content

Commit

Permalink
Fixes some IE11 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jvorcak committed Feb 28, 2019
1 parent edf58bb commit ca77cdb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default class ReactConsole extends React.Component<Props, State> {
[]
: this.props.history.map(entry => (reverseSearchString === undefined || reverseSearchString === '') ?
// @ts-ignore
false : entry.includes(reverseSearchString))
false : entry.indexOf(reverseSearchString) !== -1)
};

/**
Expand Down Expand Up @@ -343,10 +343,13 @@ export default class ReactConsole extends React.Component<Props, State> {
private onReverseKeyDown = (event: any) => {
if (event.which === 38 || event.which === 40) { // up or down
this.disableReverseSearch()
event.preventDefault();
} else if (event.which === 67 && event.ctrlKey) { // ctrl + c
this.disableReverseSearch(false);
event.preventDefault();
} else if (event.which === 82 && event.ctrlKey) { // ctrl + r
this.nextReverseSearch();
event.preventDefault();
}
};

Expand Down Expand Up @@ -376,12 +379,14 @@ export default class ReactConsole extends React.Component<Props, State> {
return
}
this.onReverseSearch()
event.preventDefault()
} else if (event.which === 67 && event.ctrlKey) { // ctrl + c
this.setState({
output: [...this.state.output, this.getCurrentTextSnapshot()],
input: '',
});
this.scrollToBottom();
event.preventDefault()
}
};

Expand Down

0 comments on commit ca77cdb

Please sign in to comment.