Skip to content

Commit

Permalink
fix slab#874
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Aug 22, 2016
1 parent 024cd3f commit d31827f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ Toolbar.DEFAULTS = {
let range = this.quill.getSelection();
let formats = this.quill.getFormat(range);
let indent = parseInt(formats.indent || 0);
if (value === '+1') {
this.quill.format('indent', indent + 1, Quill.sources.USER);
} else if (value === '-1') {
this.quill.format('indent', indent - 1, Quill.sources.USER);
if (value === '+1' || value === '-1') {
let modifier = (value === '+1') ? 1 : -1;
if (formats.direction === 'rtl') modifier *= -1;
this.quill.format('indent', indent + modifier, Quill.sources.USER);
}
}
}
Expand Down

0 comments on commit d31827f

Please sign in to comment.