Skip to content

Commit

Permalink
fix #824
Browse files Browse the repository at this point in the history
Firefox moves the cursor upon deleting last character of format
  • Loading branch information
jhchen committed Jul 30, 2016
1 parent 21c510a commit 6249648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Keyboard extends Module {
});
this.addBinding({ key: Keyboard.keys.ENTER, shiftKey: null }, handleEnter);
this.addBinding({ key: Keyboard.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function() {});
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^$/ }, function(range) {
this.addBinding({ key: Keyboard.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, function(range) {
if (range.index === 0) return;
this.quill.deleteText(range.index - 1, 1, Quill.sources.USER);
this.quill.selection.scrollIntoView();
Expand Down

0 comments on commit 6249648

Please sign in to comment.