bmcmahen / react-wysiwyg

retain some control over contenteditable input
169 stars 37 forks source link

Spaces eaten up on Firefox #34

Open ygravrand opened 9 years ago

ygravrand commented 9 years ago

On Firefox (here version 42), spaces are eaten up as we type. See capture below: test2

bmcmahen commented 9 years ago

Hmm. This is new. Looks like a regression of some sort.

kristofmic commented 8 years ago

I'm not sure if there is a way to fix this with code, but I had a similar problem with a contenteditable field on FF and the solution I found was to apply a whitespace pre-wrap style to the element.

white-space: pre-wrap;       /* css-3 */
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
white-space: -pre-wrap;      /* Opera 4-6 */
white-space: -o-pre-wrap;    /* Opera 7 */
word-wrap: break-word;

Could extend (assign) the style prop with these to ensure they're applied.

akhayoon commented 8 years ago

@kristofmic your style code solved the issue for me on FF as well. Thank you

pixelbucket-dev commented 8 years ago

Actually the property "-moz-pre-space" does the trick!