Merge pull request #352 from paulkaplan/disable-keyboard-shortcuts

Disable keyboard shortcuts because they interfere with text tool
This commit is contained in:
Paul Kaplan 2018-03-30 13:07:02 -04:00 committed by GitHub
commit 7399d7d8f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,10 +55,12 @@ class PaintEditor extends React.Component {
}; };
} }
componentDidMount () { componentDidMount () {
document.addEventListener('keydown', event => { document.addEventListener('keydown', _event => {
// Don't activate keyboard shortcuts during text editing // Don't activate keyboard shortcuts during text editing
if (!this.props.textEditing) { if (!this.props.textEditing) {
this.props.onKeyPress(event); // @todo disabling keyboard shortcuts because there is a bug
// that is interfering with text editing.
// this.props.onKeyPress(_event);
} }
}); });
// document listeners used to detect if a mouse is down outside of the // document listeners used to detect if a mouse is down outside of the