web-bugs icon indicating copy to clipboard operation
web-bugs copied to clipboard

connect.microsoft.com - Description text is chopped off [msft ref# 1965342]

Open onlyusesphp opened this issue 11 years ago • 21 comments

URL: https://connect.microsoft.com/IE/Feedback/Details/1168255 Browser / Version: Firefox 36.0 Operating System: Mac OS X 10.10 Problem type: Looks like the website has a bug. Site owner: No

Steps to Reproduce

  1. Navigate to: https://connect.microsoft.com/IE/Feedback/Details/1168255
  2. Look at the text below the "Description" heading (it starts with "Most Microsoft, Mac,")

Expected Behavior: Should be able to read the entire Description text Actual Behavior: Description text is chopped off partway through and the field can't be scrolled either, so it's impossible to read the rest of it

onlyusesphp avatar Mar 08 '15 10:03 onlyusesphp

Thanks @onlyusesphp

  • First of all the viewport is large: 958px in all browsers. It doesn't resize with smaller viewports.
  • The text is contained in a pre element, itself wrapped in a span element :japanese_ogre:
<span class="FeedbackDetailsDescriptionText">
    <pre>Most Microsoft, …</pre>
</span>

the pre has

pre {
    color: rgb(51, 51, 51);
    font-family: "Segoe UI";
    word-wrap: break-word;
}

The CSS will not be effective on pre because by default at the browser level, pre is defined with:

xmp, pre, plaintext {
  display: block;
  font-family: -moz-fixed;
  white-space: pre;
  margin: 1em 0;
}

if locally the pre was made as white-space: normal, that would work.

All of that said is it really a bug of the CSS or someone who used a pre here when they should not have?

cc @TheWebJustWorks

Some variety in between browsers. To note that word-wrap: break-word; in blink takes precedence over white-space: pre;.

karlcow avatar Mar 09 '15 05:03 karlcow

To note that word-wrap: break-word; in blink takes precedence over white-space: pre;.

@dholbert do you have an opinion on that?

karlcow avatar Mar 09 '15 05:03 karlcow

This is a Blink bug. Gecko is correct to ignore word-wrap on elements with white-space:pre.

Both properties are defined in http://dev.w3.org/csswg/css-text-3/ . The word-wrap spec-text there explicitly says:

It only has an effect when white-space allows wrapping

http://dev.w3.org/csswg/css-text-3/#overflow-wrap-property

And the pre value for white-space does not allow wrapping. (This is particularly explicit in the definition of white-space:nowrap, which says:

like pre, it does not allow wrapping.

http://dev.w3.org/csswg/css-text-3/#propdef-white-space

dholbert avatar Mar 09 '15 07:03 dholbert

If someone wants a <pre> element that allows wrapping (as is the case here), they should give it white-space:pre-wrap. I can fix the original URL here by adding white-space:pre-wrap to the

 element, using Firefox's devtools.

That's the correct fix here, I think, on the site side.

dholbert avatar Mar 09 '15 07:03 dholbert

Looks like I filed a Blink bug for this issue already, last year: https://code.google.com/p/chromium/issues/detail?id=373502

And there's a WebKit bug on this that's been open since 2010: https://bugs.webkit.org/show_bug.cgi?id=38222

dholbert avatar Mar 09 '15 07:03 dholbert

~~Since this is a M$ site, I'm guessing IE has the same incorrect behavior as Blink? (I don't have a Windows machine to test myself.)~~

Edit: Ah, yeah, apparently IE matches Chrome. Any IE bug report for that?

onlyusesphp avatar Mar 09 '15 07:03 onlyusesphp

Not that I'm aware of. Would you be up for filing one?

dholbert avatar Mar 09 '15 14:03 dholbert

Thanks, I filed one!

gregwhitworth avatar Mar 09 '15 20:03 gregwhitworth

thanks for reporting! we have a bug filed (as mentioned by @gregwhitworth) and are investigating whether we could change our behavior or push FF and the spec to change.

TheWebJustWorks avatar Mar 09 '15 20:03 TheWebJustWorks

Note that the spec seems to have changed radically to the point where nothing much is defined in the editor's draft :) http://dev.w3.org/csswg/css-text-4/ version 4

In version 3 http://dev.w3.org/csswg/css-text-3/#white-space-property I read for white-space: pre:

This value prevents user agents from collapsing sequences of white space. Segment breaks such as line feeds and carriage returns are preserved as forced line breaks. Lines only break at forced line breaks; content that does not fit within the block container overflows it.

The summary table is quite clear. There is an additional property for wrapping in a pre element: pre-wrap

karlcow avatar Mar 10 '15 05:03 karlcow

Note that the spec seems to have changed radically [...] version 4

To be clear, that's a different spec - the (apparently very early-stages) css-text "level 4" spec. (It's not "version 4" in the sense of replacing "version 3" -- instead, it builds on level 3.)

Quoting the CSS level definition: "Each level of CSS builds on the previous, refining definitions and adding features". So we can expect the final css-text-4 to be reasonably backwards-compatible with css-text-3.

dholbert avatar Mar 10 '15 17:03 dholbert

This is a Blink bug. Gecko is correct to ignore word-wrap on elements with white-space:pre.

Both properties are defined in http://dev.w3.org/csswg/css-text-3/ . The word-wrap spec-text there explicitly says:

It only has an effect when white-space allows wrapping

http://dev.w3.org/csswg/css-text-3/#overflow-wrap-property

And the pre value for white-space does not allow wrapping. (This is particularly explicit in the definition of white-space:nowrap, which says:

like pre, it does not allow wrapping.

http://dev.w3.org/csswg/css-text-3/#propdef-white-space

TheWebJustWorks avatar Apr 01 '15 23:04 TheWebJustWorks

@TheWebJustWorks Cool for the clarifications.

So I guess back to contacting Connect Web site, would you do that? :) thanks.

karlcow avatar Apr 02 '15 00:04 karlcow

yep:) thanks @karlcow !

TheWebJustWorks avatar Apr 02 '15 00:04 TheWebJustWorks

Still an issue ;)

hallvors avatar Oct 05 '15 08:10 hallvors

@TheWebJustWorks ping ping ;)

karlcow avatar Feb 19 '16 02:02 karlcow

I'm reading through the comments and trying to understand the call to action for Connect. Does this occur on Chrome as well? The correct behavior is only seen in Firefox?

cew6992 avatar Feb 19 '16 05:02 cew6992

@cew6992 Connect currently uses both word-wrap: break-word and white-space: pre, which is not a sensical combination. The CSS Text spec says that word-wrap should be ignored when white-space is pre (among other cases). To address this, https://github.com/webcompat/web-bugs/issues/773#issuecomment-77808500 suggests that Connect switch from white-space: pre to white-space:pre-wrap. I guess an alternate approach could be to make the <pre> horizontally scrollable.

Firefox obeys the CSS Text spec, which with Connect's current CSS, causes the text to not wrap, which is undesirable. Chrome & IE don't currently obey the CSS Text spec, which with Connect's current CSS, causes the text to wrap, which is desirable.

onlyusesphp avatar Feb 19 '16 06:02 onlyusesphp

We've followed up with the connect.microsoft.com team and asked them to update this thread.

TheWebJustWorks avatar Feb 19 '16 19:02 TheWebJustWorks

Not fixed as of today

karlcow avatar Aug 16 '16 05:08 karlcow