Ticket #9532 (closed bug: fixed)

Opened 2 years ago

Last modified 19 months ago

Need a way in Menu to keep ui-state-active class on selected item

Reported by: fnagel Owned by: k_borchers
Priority: minor Milestone: git
Component: ui.menu Version: git
Keywords: Cc:
Blocking: Blocked by:


When Selectmenu is opened we have a ui-state-focus class on the active item. This is correct as the menu item has focus but we need to add ui-state-active as well.

Without, the item is could not have its own style and looks almost similar to the button in the default CSS framework style.

I've tried to simply add the class when the menu is opened (as we did for for removing old *-focus classes) but its removed after delay in _close method. Any idea how to workaround?

This ticket is related to the comments of Juan Lanus, see:  http://wiki.jqueryui.com/w/page/12138056/Selectmenu

I've already talked to Scott via IRC and we decided to open a ticket for Menu.

Change History

comment:1 Changed 2 years ago by k_borchers

  • Owner set to k_borchers
  • Status changed from new to assigned

@fnagel, do you have, or could you create, a branch where you are adding ui-state-active but it's being removed. I have some things I can try here but would be easier to test if you have selectmenu doing what you want and demonstrating the issue with menu.

comment:2 Changed 2 years ago by fnagel

@k_borchers, please see this branch:  https://github.com/fnagel/jquery-ui/tree/new-selectmenu-dev Just open a selectmenu and watch the ui-state-active class disappear after 1/3 second. The branch includes a unit test.

comment:3 Changed 2 years ago by Kris Borchers

  • Status changed from assigned to closed
  • Resolution set to fixed

Menu: More precise removal of ui-state-active class for easier CSS overrides. Fixes #9532 - Need a way in Menu to keep ui-state-active class on selected item

Changeset: 52307ebadbca3f403549140e1d34f08bc07bf8ce

comment:4 Changed 2 years ago by scott.gonzalez

  • Milestone changed from none to 1.11.0

comment:5 Changed 19 months ago by scott.gonzalez

  • Version changed from 1.10.3 to git
  • Milestone changed from 1.11.0 to git
Note: See TracTickets for help on using tickets.