Gutenberg: Columns Block (beta): long content in doesn't wrap and pushes editor off page

Created on 12 Jul 2018  路  11Comments  路  Source: WordPress/gutenberg

Describe the bug
Adding in long amounts of text pushes the whole editor off the edge of the page.

gutenberg_columnblockforcesblockoffedgeofpage

To Reproduce
Steps to reproduce the behavior:

  1. Add column Block
  2. Add some text to one column
  3. Add text without spaces to another column

Expected behavior
Content should wrap

_macOS Sierra 10.12.1
Firefox Quantum 61.0.1 (64-bit)
Gutenberg 3.2.0_

[Block] Columns [Feature] Blocks [Type] Bug

All 11 comments

Tested and confirmed using WordPress 4.9.7 and Gutenberg 3.2.0 on Firefox 61.0.1 on macOS 10.13.5.

screen shot 2018-07-16 at mon jul 16 4 50 59 pm

This also breaks the front-end as well and causes horizontal scrolling.

gutenberg_columnscontentdoesntbreakword

You need to add word-break: break-all; on .wp-block-column

Testing this on 3.9 - I think the back-end issue here has been resolved somewhere along the line.

screen shot 2018-09-26 at 13 54 59

The front end issue however has not been resolved.

screen shot 2018-09-26 at 13 58 50

I can still reproduce this issue in master. (Tested in Firefox Beta.)
image

Can confirm, yep, this is still an issue on the front-end and back-end.

Back-end vid: https://cl.ly/c7e79cefe9c6

Front-end vid: https://cl.ly/bbc80ba11159

@eddhurst Not sure why you would do word-break: break-word;. The allowable values for word-break are normal | keep-all | break-all.

https://www.w3.org/TR/css-text-3/#word-break-property

@maddisondesigns That is true, but word-break: break-all; is definitely not the expected behaviour of text within a column - and aggressively breaks words, even if they would otherwise wrap.

break-word is unofficial, but supported by Chrome, Safari and other WebKit/Blink browsers: https://caniuse.com/#search=word-break

Edit - strike that, I stupidly thought Firefox was in that list as well, sorry about that. The issue with break-all is that is ends up looking like this:

break-word

screen shot 2018-09-28 at 11 38 34

break-all

screen shot 2018-09-28 at 11 38 44

I have updated the initial PR, which correctly fixes this issue. I realised that word-break: break-word is effectively just treated as word-wrap: break-word

word-wrap has much better browser support and is understood by FF, IE and Edge.

This appears to have been fixed in the last few updates to columns

I replied to your forum post with the results of a test I ran.

Was this page helpful?
0 / 5 - 0 ratings