Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#9377 closed bug (fixed)

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/

Change History (7)

comment:1 Changed 5 years ago by tj.vantoll

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/

comment:2 Changed 5 years ago by tj.vantoll

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" ) );
});

comment:4 Changed 5 years ago by TJ VanToll

Resolution: fixed
Status: openclosed

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

Changeset: 91b7b9f9ab2e5baa31e37f34600457599409e161

comment:5 Changed 5 years ago by tj.vantoll

Milestone: none1.11.0

comment:6 Changed 4 years ago by TJ VanToll

Menu: Reset ui-menu-icons class in refresh. Fixes #9377: Menu: Refreshing should recheck for menu icons (cherry picked from commit 91b7b9f9ab2e5baa31e37f34600457599409e161)

Changeset: db1ee1af85ea2f0671f370e325d4ba5b971b2dd0

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

Milestone: 1.11.01.10.4
Note: See TracTickets for help on using tickets.