table icon indicating copy to clipboard operation
table copied to clipboard

Bug: spaces don't work in the table

Open panphilov opened this issue 3 years ago • 3 comments

Hello! Several users are complaining that they cannot put a space inside the table if the caret is at the beginning or at the end of a word. One report was also about the fact that a space also doesn't work in the middle of a word. This is happening in Safari, but not for all users somehow.

panphilov avatar May 21 '22 09:05 panphilov

I investigate a little more. In my Mac, the attribute of line-break:normal; cause this problem. I can' t reproduce on Edge. Safari only.

Here is the reproducible jsfiddle.

https://jsfiddle.net/2afkLnj1/

karino2 avatar Jul 13 '22 00:07 karino2

Im encountering a similar issue with react editor js.

N3M0dropserver avatar Jul 21 '22 23:07 N3M0dropserver

I found a workaround by overriding the line-break rule that .tc-cell uses with a value of after-white-space, which seems to be a non-standard value Safari uses by default (I noticed it in Safari's inspector). I tried all other CSS values like auto, strict, inherit etc but nothing worked, only after-white-space fixed it. So, on my HTML page I declared...

<style> .tc-cell { line-break: after-white-space; } </style>

In Chrome, Edge and Firefox after-white-space is treated as invalid and thus disregarded and all is well. I would expect Safari to fix this eventually and when they do this fix should gracefully co-exist if you forget to remove the rule.

morsecoding avatar Feb 23 '23 18:02 morsecoding