menu widget - items without text marked as dividers
I would like to be able to have a ui-menu-item that consists solely of an icon.
With the widget currently, this will become a divider.
This is due to the decision code which merely looks for the presence of non-hyphen, non-space text:
ui/widgets/menu.js:515
_isDivider: function( item ) {
// Match hyphen, em dash, en dash
return !/[^\-\u2014\u2013\s]/.test( item.text() );
},
Is this a design decision or an oversight?
I've got a patch for a fix so that if the item has children, it remains as menu item, but does it fit in with the jquery ui ethos?
I'll submit a bug and patch anyway.