diff --git a/modules/ve/ui/styles/ve.ui.Widget.css b/modules/ve/ui/styles/ve.ui.Widget.css index 75e787d929..9405f06ddd 100644 --- a/modules/ve/ui/styles/ve.ui.Widget.css +++ b/modules/ve/ui/styles/ve.ui.Widget.css @@ -385,7 +385,7 @@ outline: none; } -/* ve.ui.CategoryListWidget */ +/* ve.ui.MWCategoryWidget */ .ve-ui-mwCategoryListWidget { border: 1px solid #CCC; @@ -393,11 +393,22 @@ padding: .75em; } +.ve-ui-mwCategoryListWidget-items { + /* MDN claims we need to use word-wrap: break-word; and that it's been renamed to + * overflow-wrap: break-word; , but the only thing that actually works in practice is + * word-break: break-word; (which is not documented in any standard at all). So we just use + * all three. + */ + word-break: break-word; + word-wrap: break-word; + overflow-wrap: break-word; +} + .ve-ui-mwCategoryInputWidget { float: left; } -/* ve.ui.CategoryListItemWidget */ +/* ve.ui.MWCategoryListItemWidget */ .ve-ui-mwCategoryListItemWidget { position: relative; diff --git a/modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js b/modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js index b83ca6dee2..43a930e7d2 100644 --- a/modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MWCategoryWidget.js @@ -49,7 +49,7 @@ ve.ui.MWCategoryWidget = function VeUiMWCategoryWidget( config ) { // Initialization this.$.addClass( 've-ui-mwCategoryListWidget' ) .append( - this.$group, + this.$group.addClass( 've-ui-mwCategoryListWidget-items' ), this.input.$, this.$$( '
' ).css( 'clear', 'both' ) ); @@ -59,6 +59,8 @@ ve.ui.MWCategoryWidget = function VeUiMWCategoryWidget( config ) { ve.inheritClass( ve.ui.MWCategoryWidget, ve.ui.Widget ); +ve.mixinClass( ve.ui.MWCategoryWidget, ve.ui.GroupElement ); + /* Events */ /**