Page MenuHomePhabricator

Long property values of type Text wrapped inside a html tag sometimes breaking the site layout when factbox is visible
Closed, ResolvedPublic

Description

When the factbox is visible (usually on page preview) and there is a property value of type Text assigned where the text is very long and wrapped inside a <div> or <span>, the site layout will break completely.

The text between the starting and ending text must me long as well to trigger this. Perhaps there are other circumstances needed to trigger this It doesn't happen every time I would expect it...

Example:
http://sandbox.semantic-mediawiki.org/wiki/Nested_div_in_long_text_property_value


Version: unspecified
Severity: normal

Details

Reference
bz23185

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:04 PM
bzimport set Reference to bz23185.

I ran into this problem with properties of type URL. Long URLs are routine. I solved the issue with this bit of CSS in my MediaWiki:Common.css:

/* Ensures long URLs in the SMW factbox don't ruin page layout */
.smwprops { word-wrap:break-word; }

the smwprops class should probably have that CSS added to it in SMW core. That will probably solve the problem except maybe in unusual cases where the properties themselves contain markup that interferes with that CSS. I'm not sure how to handle that, but for now, my "patch" above should solve the problem in most cases.