Don't navigate away when paint editor is open and delete/backspace are pressed' (#679)

This commit is contained in:
DD Liu 2018-09-18 16:17:51 -04:00 committed by GitHub
parent b6ad997ea2
commit a5baa14316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}