From a2749a752a1b24d1291b63f06b1cf128201342ab Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 9 Mar 2019 20:12:43 -0800 Subject: [PATCH] ESC key should go back when editing a document --- app/scenes/Document/Document.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/scenes/Document/Document.js b/app/scenes/Document/Document.js index f436a1dc8..8451a0e18 100644 --- a/app/scenes/Document/Document.js +++ b/app/scenes/Document/Document.js @@ -101,6 +101,12 @@ class DocumentScene extends React.Component { if (this.document) this.props.history.push(documentMoveUrl(this.document)); } + @keydown('esc') + goBack(ev) { + ev.preventDefault(); + this.props.history.goBack(); + } + @keydown('h') goToHistory(ev) { ev.preventDefault();