quill
quill copied to clipboard
With Edge 41, typing Enter splits a formatted line (e.g. "L\nine" instead of "Line\n")
Steps for Reproduction
- Visit https://quilljs.com/playground
- Turn on bold (ctrl-b)
- Type "Line"
- Press enter
Expected behavior:
The editor contains "Line\n". The caret is positioned at the end of content.
Actual behavior:
The editor contains "L\nine"; i.e., the line was split after the L. The caret is positioned at the start of the second line, just before the "ine"
Platforms:
Browser: MS Edge 41.16299.15.0, EdgeHTML 16.16299 Operating System: Windows 10 Enterprise, Version 1709, OS Build 16299.64
Version:
1.3.4
Additional Information:
Logging the result of this.quill.on(Quill.events.EDITOR_CHANGE, (a, b) => console.log('onEditorChange', a, JSON.stringify(b))); for the above scenario generates an output of:
onEditorChange selection-change {"index":1,"length":0}
onEditorChange text-change {"ops":[{"insert":"L","attributes":{"bold":true}}]}
onEditorChange text-change {"ops":[{"retain":1},{"insert":"i","attributes":{"bold":true}}]}
onEditorChange text-change {"ops":[{"retain":2},{"insert":"n","attributes":{"bold":true}}]}
onEditorChange text-change {"ops":[{"retain":3},{"insert":"e","attributes":{"bold":true}}]}
onEditorChange text-change {"ops":[{"retain":1},{"insert":"\n"}]}
onEditorChange selection-change {"index":2,"length":0}
The same scenario in Chrome on Ubuntu 17.10 - which operates as expected - results in:
onEditorChange selection-change {"index":1,"length":0}
onEditorChange text-change {"ops":[{"insert":"L","attributes":{"bold":true}}]}
onEditorChange selection-change {"index":2,"length":0}
onEditorChange text-change {"ops":[{"retain":1},{"insert":"i","attributes":{"bold":true}}]}
onEditorChange selection-change {"index":3,"length":0}
onEditorChange text-change {"ops":[{"retain":2},{"insert":"n","attributes":{"bold":true}}]}
onEditorChange selection-change {"index":4,"length":0}
onEditorChange text-change {"ops":[{"retain":3},{"insert":"e","attributes":{"bold":true}}]}
onEditorChange text-change {"ops":[{"retain":4},{"insert":"\n"}]}
onEditorChange selection-change {"index":5,"length":0}
+1 I've seen this happening as well in Edge 41 recently
Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide :pray: