Skip to content

Commit e864bf6

Browse files
jbbakstjhchen
authored andcommitted
Emit single change when typing enter on empty list line (#2279)
1 parent 8d9e3ab commit e864bf6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

modules/keyboard.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,16 @@ Keyboard.DEFAULTS = {
260260
format: ['list'],
261261
empty: true,
262262
handler(range, context) {
263-
this.quill.format('list', false, Quill.sources.USER);
263+
const formats = { list: false };
264264
if (context.format.indent) {
265-
this.quill.format('indent', false, Quill.sources.USER);
265+
formats.indent = false;
266266
}
267+
this.quill.formatLine(
268+
range.index,
269+
range.length,
270+
formats,
271+
Quill.sources.USER,
272+
);
267273
},
268274
},
269275
'checklist enter': {

0 commit comments

Comments
 (0)