Open Bug 1119289 Opened 10 years ago Updated 3 years ago

Text does not wrap before element with whitespace: nowrap if window width would ask for wrap inside that (non-wrapping) element

Categories

(Core :: Layout: Block and Inline, defect)

34 Branch
defect

Tracking

()

People

(Reporter: simon, Unassigned)

References

()

Details

(Keywords: reproducible, testcase)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 Build ID: 20141126041045 Steps to reproduce: The following markup does not work as expected, depending on the window width. Have a look at the screenshots to see what I mean (chrome in them middle does it right, or at least as I would expect): <html><head lang="en"> <meta charset="UTF-8"> <title>Discretionary line break</title> <style type="text/css"> .noBreak { white-space: nowrap; } .allowBreak { white-space: normal; } </style> </head> <body> <p class="noBreak">"a group of words to keep together" <span class="allowBreak">only allow breaks here</span> "another group"</p> </body></html> Actual results: Line does not break when window width is after the span. It does work as expected when it is over the span or before. Expected results: Line should break inside span even if window width is after span
If I set the display property of the paragraph to flex it gets very weird, see 2nd screenshot
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Text
Ever confirmed: true
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Summary: line does not break → Text does not wrap before element with whitespace: nowrap if window width would ask for wrap inside that (non-wrapping) element
Component: Layout: Text → Layout: Block and Inline
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: