-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text in various blocks does not break/wrap at block boundaries (Gecko/Firefox default styling issue) #6049
Comments
These blocks do wrap for me, you may have an extra style loaded by a plugin that breaks these blocks. |
@youknowriad I just tested without any plugins and with the Twenty Seventeen theme, and the text is still not wrapping properly. (I am using Gutenberg 2.6.) (Ignore the blank text on the sidebar, that was something else I was messing around with when I took the screenshot.) |
It looks like Firefox do wrap if you have have spaces. What's the correct behavior here @jasmussen ? Should we always wrap even without space? |
@youknowriad I just tested, and uninterrupted strings of characters are wrapped in Chromium, but not Firefox, which is the browser I am using. This issue is due to a difference in default browser styles. Firefox has Concerning what Gutenberg should do, I think always wrapping text when there is no other possible break point is a more useful behavior, both for the editor and the front-end. This can be accomplished with the CSS property I tested, and changing the |
We should always wrap, ideally we break words, but if we can't we should break even without spaces. Can confirm this is also broken in Firefox for me. Going to take this one. |
This PR, maybe, fixes #6049. CC: @SuperGeniusZeb. It is a one line code change, but this change is put into a highly unscoped and generic location, so I would appreciate both lots of testing and sanity checking that there are no adverse side-effects to doing this. For reference, this is what we're using: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap We could also have used https://developer.mozilla.org/en-US/docs/Web/CSS/word-break
* Fix text wrapping in Firefox. This PR, maybe, fixes #6049. CC: @SuperGeniusZeb. It is a one line code change, but this change is put into a highly unscoped and generic location, so I would appreciate both lots of testing and sanity checking that there are no adverse side-effects to doing this. For reference, this is what we're using: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap We could also have used https://developer.mozilla.org/en-US/docs/Web/CSS/word-break * Scope to block list. * docs: Tweak comment
@jasmussen I am still seeing this on my website neutro.net when I view it on Chrome (Desktop windows 10 and android 11 version 86.0.4240.111) but no on firefox (mobile version 82.1.1).
|
Hi @shryber, it looks like the text that doesn't wrap in your screenshot is pasted inside a code block, correct? I believe that at the moment, the code block intentionally does not provide any wrapping, but I can also see that it doesn't provide any overflow management either (such as a horizontal scrollbar). Please feel free to open a separate ticket and CC me and we can look at adding something there. |
@jasmussen Opened a new issue: #26600 (comment) |
All good, it's on my radar now, thanks. I'll take a look next week, my day is about to wrap here. |
Great, thanks so much!
On Fri, Oct 30, 2020 2:54 PM, Joen A. [email protected] wrote:
All good, it's on my radar now, thanks. I'll take a look next week, my day is
about to wrap here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Issue Overview
The following blocks do not break/wrap long strings of characters when they reaches the edge of the block in the editor:
Some blocks do break/wrap long strings of characters when they get too long, like the Button, Code, and Shortcode blocks. I would expect most other blocks to act the same, with the exception of some blocks like the Preformatted block and maybe Verse block.
Steps to Reproduce (for bugs)
Expected Behavior
Text in most blocks should always break and wrap once it reaches the boundaries of the block.
Current Behavior
Long strings of characters without any breaking characters like spaces or hyphens will just extend outside the boundaries of the block and go off the screen. This is especially noticeable when using nested blocks in columns.
Related Issues and/or PRs
#5130
The text was updated successfully, but these errors were encountered: