Skip to content

Commit

Permalink
Check for absence of shift key in the save shortcut (#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamenco authored and rhukster committed Mar 18, 2018
1 parent a21f1c1 commit ca4d1ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions themes/grav/app/forms/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ export default class Form {
$(global).on('keydown', function(event) {
var key = String.fromCharCode(event.which).toLowerCase();
if (((event.ctrlKey && !event.altKey) || event.metaKey) && key === 's') {
event.preventDefault();
saveTask.click();
if (!event.shiftKey) {
event.preventDefault();
saveTask.click();
}
}
});
}
Expand Down

0 comments on commit ca4d1ca

Please sign in to comment.