quill icon indicating copy to clipboard operation
quill copied to clipboard

Can't add space at the end of a line (only Firefox)

Open luknl opened this issue 5 years ago • 5 comments

Hi! I've just found a weird bug! Whenever I type a white space, it gets stripped out automatically. So I I want to write Hey man, it will render as Heyman. However, when you try to add a space, but not at the end of the line, like adding "my" between "Hey" and "man". Then it works and renders Hey my man. It works fine on all other browsers, except Firefox for some reason. Any help would be appreciated 😃

Platforms: Firefox 79.0 (64-bit) - Mac Version: 1.3.7

luknl avatar Aug 06 '20 13:08 luknl

Hi, @luknl! It's really weird and there is no way to see it. Because in my project an adding of space works correctly. May be you can give us a codepen or something like this? But, You need to check up your keybinding section of settings of Quill. Because I wathced similar problems once and they were made by keybindings

https://quilljs.com/docs/modules/keyboard/#key-bindings

KamilOcean avatar Aug 06 '20 14:08 KamilOcean

We're also running into this bug on the latest Firefox 79 release. We have no key bindings registered.

Going to dig deeper next week.

iamcarbon avatar Aug 07 '20 19:08 iamcarbon

@KamilOcean, we also don't have any key bindings. I tried to find other reasons and dig a bit but couldn't find anything. @iamcarbon, please let me know if you find out why this happens!

luknl avatar Aug 07 '20 19:08 luknl

Also getting this on Firefox Dev 80.0b7 (Mac) w/ quill-emoji module Trimming out spaces while inputing text

Edit: I've managed to fix it. It looks like this happens if you forget to include quill.core.css in the project.

tjw0051 avatar Aug 21 '20 13:08 tjw0051

Also getting this on Firefox Dev 80.0b7 (Mac) w/ quill-emoji module Trimming out spaces while inputing text

Edit: I've managed to fix it. It looks like this happens if you forget to include quill.core.css in the project.

What @tjw0051 proposed, didn't work in my case. But there had to be something in the quill.core.css which fixed it for him, and I think it is the white-space: pre-wrap rule.

In my case, I had a custom styling which applied white-space: normal to the .ql-editor selector. After changing it to white-space: pre-wrap it works again as intended on all major browsers.

derrabauke avatar May 23 '22 13:05 derrabauke

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 10:04 quill-bot