FIXED: lineBreakMode set to CPLineBreakByTruncating* was trimming consecutive white spaces

Previously, using a truncating line break mode on a CPTextField and setting the string value to "test      test" was displaying "test test". This patch changes the css white-space property from "nowrap" to "pre" which preserves the white spaces.
This commit is contained in:
Antoine Mercadal committed 2013-10-15 12:39:03 -07:00
1 parent b20d711922
commit 0b5a98d3fe
1 file changed
+1 -1
+1 -1
View File
@@ -519,7 +519,7 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
case CPLineBreakByTruncatingMiddle: // Don't have support for these (yet?), so just degrade to truncating tail.
case CPLineBreakByTruncatingTail:
textStyle.textOverflow = "ellipsis";
textStyle.whiteSpace = "nowrap";
textStyle.whiteSpace = "pre";
textStyle.overflow = "hidden";
textStyle.wordWrap = "normal";
break;