quill icon indicating copy to clipboard operation
quill copied to clipboard

With Edge 41, typing Enter splits a formatted line (e.g. "L\nine" instead of "Line\n")

Open ghost opened this issue 8 years ago • 1 comments

Steps for Reproduction

  1. Visit https://quilljs.com/playground
  2. Turn on bold (ctrl-b)
  3. Type "Line"
  4. 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}

ghost avatar Nov 28 '17 18:11 ghost

+1 I've seen this happening as well in Edge 41 recently

thinksaydo avatar Nov 28 '17 18:11 thinksaydo

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:

quill-bot avatar Apr 17 '24 11:04 quill-bot