Merge pull request #196 from jorilallo/shortcut-fixes

Fixes: Hitting 'e' shortcut should not add an e to the document
This commit is contained in:
Jori Lallo
2017-09-03 12:13:43 -07:00
committed by GitHub

View File

@@ -69,9 +69,13 @@ type Props = {
}
@keydown('e')
goToEdit() {
if (!this.props.documents.active) return;
this.props.history.push(documentEditUrl(this.props.documents.active));
goToEdit(ev) {
const activeDocument = this.props.documents.active;
if (!activeDocument) return;
ev.preventDefault();
ev.stopPropagation();
this.props.history.push(documentEditUrl(activeDocument));
}
handleLogout = () => {