Skip to content

Commit

Permalink
Fix the default browser shorcuts by not preventing defaults wholesale (
Browse files Browse the repository at this point in the history
  • Loading branch information
monfera authored and cqliu1 committed Jul 26, 2018
1 parent 57146c5 commit e4fe66b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/components/workpad_page/event_handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ const handleMouseDown = (commit, e, isEditable) => {
const keyCode = key => (key === 'Meta' ? 'MetaLeft' : 'Key' + key.toUpperCase());

const handleKeyDown = (commit, e, editable, remove) => {
e.preventDefault();
const key = e.key;
if (editable) {
if (key === 'Backspace' || key === 'Delete') {
e.preventDefault();
remove();
} else {
commit('keyboardEvent', {
Expand Down

0 comments on commit e4fe66b

Please sign in to comment.