KillerCodeMonkey / ngx-quill

Angular (>=2) components for the Quill Rich Text Editor
MIT License
1.79k stars 262 forks source link

span with ql-editor class has infinite width #1522

Closed kevingy closed 2 years ago

kevingy commented 2 years ago

I'm seeing a problem on Safari (only - this works on Chrome, Firefox and Edge). When I'm displaying text that was created or edited by Quill and displayed like this:

<span class="ql-editor" [innerHTML]="trustHtml(text)"></span>

The span initially displays within the expected 600px width, but as soon as I move the mouse, the span grows infinitely. The more the mouse moves, the wider the span gets - tens of thousands of pixels. The trustHtml method does what many examples of using this technique with DomSanitizer.

I don't know if this has anything to do with it, but the span is in a cell of a mat-table. The issue behaves as though it's JavaScript DOM manipulation that's setting the width, but I can't be sure.

kevingy commented 2 years ago

This problem also appears (again, only on Safari on Mac) on any Quill editor. The width expands into infinity on mouse move over the component.

KillerCodeMonkey commented 2 years ago

in general this looks more like a quilljs problem and not one with my angular wrapper :)

kevingy commented 2 years ago

I'll take this issue there. Danke!

KillerCodeMonkey commented 2 years ago

Then... just test it outside if a mat cell :). So we know if it is mat-cell related

Kevin Yochum @.***> schrieb am Mo., 18. Apr. 2022, 02:00:

I'm seeing a problem on Safari (only - this works on Chrome, Firefox and Edge). When I'm displaying text that was created or edited by Quill and displayed like this:

<span class="ql-editor" [innerHTML]="trustHtml(text)">

The span initially displays within the expected 600px width, but as soon as I move the mouse, the span grows infinitely. The more the mouse moves, the wider the span gets - tens of thousands of pixels. The trustHtml method does what many examples of using this technique with DomSanitizer.

I don't know if this has anything to do with it, but the span is in a cell of a mat-table. The issue behaves as though it's JavaScript DOM manipulation that's setting the width, but I can't be sure.

— Reply to this email directly, view it on GitHub https://github.com/KillerCodeMonkey/ngx-quill/issues/1522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARI4YEDLOXOTFSOC5PGPGLVFSQ2XANCNFSM5TUR7ZXA . You are receiving this because you are subscribed to this thread.Message ID: @.***>