Skip to content

Commit

Permalink
Allow cancel handler to be called while a command is in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
snowak-cb committed Jul 25, 2017
1 parent f6fa82f commit 8fd6bae
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 4 deletions.
Binary file modified dist/dist-min.tar.gz
Binary file not shown.
Binary file modified dist/dist-min.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/dist-min/react-console.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dist-min/react-console.min.js.map

Large diffs are not rendered by default.

Binary file modified dist/dist.tar.gz
Binary file not shown.
Binary file modified dist/dist.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions dist/dist/react-console.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/dist/react-console.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions lib/react-console.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/react-console.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/react-console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ export default class extends React.Component<ConsoleProps,ConsoleState> {
keyCodes[e.keyCode]();
e.preventDefault();
}
} else if(e.ctrlKey && e.keyCode === 67) {
// if input is blocked, ctrl+c should still call cancel
ctrlCodes[e.keyCode]();
e.preventDefault();
}
}
change = () => {
Expand Down

0 comments on commit 8fd6bae

Please sign in to comment.