#22751 closed defect (bug) (fixed)
Twenty Eleven: Words Break at Line Endings in Nested Comments in Firefox and IE
Reported by: | chellycat | Owned by: | lancewillett |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
Longer words in nested comments are breaking at the ends of lines in Firefox and IE. Steps to reproduce:
- Activate Twenty Eleven on a test blog
- Create a nested comment that's long enough to have multiple lines. Use this example text if you'd like: "Replying to this comment and want to see if the words will break. Momentarily waiting to see if words will break in wrong places and be moved continuously to a new line."
- View the comment on the blog and observe how the words break strangely, without hyphens.
In r21487 (the fix for #21491), the following was added to Twenty Eleven:
.commentlist .children li.comment .comment-content { margin: 1.625em 0 0; -ms-word-break: break-all; word-break: break-all; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; }
The "word-break: break-all" and "-ms-word-break: break-all" rules are causing longer words to break without hyphens. Please see attached screenshot for an example. This problem occurs in Firefox and IE9. Safari and Chrome both show hyphens.
What do you think about removing those two rules? Removing them allows the words to break with hyphens.
Attachments (4)
Change History (11)
#3
@
12 years ago
- Keywords needs-testing added
- Milestone changed from Awaiting Review to 3.5
Unfortunately the proposed fix breaks long URLs in IE9 and earlier. Not sure it's worth a trade-off. Testing out some more ...
#4
@
12 years ago
word-break
property was the culprit. 22751.2.patch should work with both long URLs and natural word breaks in all browsers.
#5
@
12 years ago
- Owner set to lancewillett
- Resolution set to fixed
- Status changed from new to closed
In 23060:
#7
@
12 years ago
Noting for future reference, in order for CSS hyphenation to work correctly the blog's language must be set to match the post or page content. (US English = "en-US" for example.)
See notes in http://wordpress.org/support/topic/strange-word-breaks-in-posts-since-11-update?replies=8#post-3569034 and http://www.quirksmode.org/blog/archives/2012/11/hyphenation_wor.html
@chellycat Did you test out removing the two lines with super long URLs like in #21491?