From a5baa14316d9948dca9c403d15349eb90780f605 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Tue, 18 Sep 2018 16:17:51 -0400 Subject: [PATCH] Don't navigate away when paint editor is open and delete/backspace are pressed' (#679) --- src/hocs/keyboard-shortcuts-hoc.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hocs/keyboard-shortcuts-hoc.jsx b/src/hocs/keyboard-shortcuts-hoc.jsx index 6a2babab..736b22a7 100644 --- a/src/hocs/keyboard-shortcuts-hoc.jsx +++ b/src/hocs/keyboard-shortcuts-hoc.jsx @@ -38,6 +38,7 @@ const KeyboardShortcutsHOC = function (WrappedComponent) { event.preventDefault(); clearSelection(this.props.clearSelectedItems); } else if (event.key === 'Delete' || event.key === 'Backspace') { + event.preventDefault(); if (deleteSelection(this.props.mode, this.props.onUpdateImage)) { this.props.setSelectedItems(this.props.format); }