Opened 4 years ago

Closed 4 years ago

#14764 closed bug (worksforme)

menu item without text becomes a divider

Reported by: andrewoxenburgh Owned by:
Priority: minor Milestone: none
Component: ui.menu Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:

Description

I would like to be able to have a menu consisting of only icons or images.

Currently that's not possible, and an item without text becomes a divider, and will behave oddly.

jsfiddle - http://jsfiddle.net/andrewox/vo6Lchz8/

github - https://github.com/andrew-oxenburgh/jquery-ui

I ran a full grunt on this.

-

ui/widgets/menu.js:515

	_isDivider: function( item ) {
		// Match hyphen, em dash, en dash
		return !/[^\-\u2014\u2013\s]/.test( item.text() );
	},

The fix was to add a check for dom children.

Change History (1)

comment:1 Changed 4 years ago by Scott González

Resolution: worksforme
Status: newclosed

There should still be some textual representation or this won't be accessible. See http://jsfiddle.net/vo6Lchz8/1/

Note: See TracTickets for help on using tickets.