Skip to main content

Search and Top Navigation

#9377 closed bug (fixed)

Opened June 13, 2013 05:13PM UTC

Closed June 17, 2013 02:37AM UTC

Last modified November 26, 2013 04:01PM UTC

Menu: Refreshing should recheck for menu icons

Reported by: shnitz Owned by:
Priority: minor Milestone: 1.10.4
Component: ui.menu Version: 1.9.2
Keywords: Cc:
Blocked by: Blocking:
Description

If a menu without icons has an icon item added, the refresh doesn't pick it up.

http://jsfiddle.net/WH6Sw/

Attachments (0)
Change History (7)

Changed June 13, 2013 06:52PM UTC by tj.vantoll comment:1

status: newopen
summary: Refreshing a menu should recheck for menu iconsMenu: Refreshing should recheck for menu icons

Confirmed against master: http://jsfiddle.net/tj_vantoll/sLxny/

Changed June 13, 2013 07:15PM UTC by tj.vantoll comment:2

The refresh method needs to conditionally add / remove the

ui-menu-icons
class. Failing test in case I don't get back around to this:

test( "refresh: icons (see #9377)", function() {
	expect( 2 );
	var element = $( "#menu1" ).menu();
	ok( !element.hasClass( "ui-menu-icons") );
	element.find( "li:first a" ).html( '<span class="ui-icon ui-icon-disk"></span>Save</a>' );
	element.menu("refresh");
	ok( element.hasClass( "ui-menu-icons" ) );
});

Changed June 13, 2013 08:49PM UTC by tj.vantoll comment:3

Changed June 17, 2013 02:37AM UTC by TJ VanToll comment:4

resolution: → fixed
status: openclosed

Menu: Reset ui-menu-icons class in refresh. Fixes #9377: Menu: Refreshing should recheck for menu icons

Changeset: 91b7b9f9ab2e5baa31e37f34600457599409e161

Changed June 17, 2013 02:38AM UTC by tj.vantoll comment:5

milestone: none1.11.0

Changed November 26, 2013 04:00PM UTC by TJ VanToll comment:6

Menu: Reset ui-menu-icons class in refresh. Fixes #9377: Menu: Refreshing should recheck for menu icons

(cherry picked from commit 91b7b9f9ab2e5baa31e37f34600457599409e161)

Changeset: db1ee1af85ea2f0671f370e325d4ba5b971b2dd0

Changed November 26, 2013 04:01PM UTC by scottgonzalez comment:7

milestone: 1.11.01.10.4