Merge pull request #7168 from KDSBrowne/2.2-restrict-spacebar-shortcut

Restrict when spacebar shortcut is activated
This commit is contained in:
Anton Georgiev 2019-04-08 12:19:30 -04:00 committed by GitHub
commit 3364d879d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,9 +223,9 @@ class WhiteboardToolbar extends Component {
panOn(event) {
const { annotationSelected } = this.state;
const { target, which } = event;
const isInputArea = target.nodeName === 'TEXTAREA' || target.nodeName === 'INPUT';
const isBody = target.nodeName === 'BODY';
if (annotationSelected.value === 'hand' || isInputArea) return;
if (annotationSelected.value === 'hand' || !isBody) return;
const { annotations } = this.props;