Opened 14 years ago

Closed 14 years ago

#4212 closed bug (fixed)

Tabs shoud NOT use togleClass() for .ui-state-hover

Reported by: onestone Owned by: klaus.hartl
Priority: minor Milestone: 1.7
Component: ui.tabs Version: 1.6rc6
Keywords: tabs hover focus Cc: [email protected]
Blocked by: Blocking:


Currently tabs (from latest SVN) binds the following function to mouseover and mouseout:

var handleState = function(state, el) {

if (':not(.ui-state-disabled)')) {

el.toggleClass('ui-state-' + state);



This breaks easily. I have no deterministing way to reproduce it, but very often after some playing with tabs, the state for a tab becomes "switched" incorrectly - i.e. it has -hover when the mouse is away, and no -hover when it's on top of it. This has happened to me many times, with various browsers.

Solution: Tabs should use addClass() and removeClass() for the appropriate event, not toggleClass().

The same thing probably applies for ui-state-focus as well.

Change History (3)

comment:1 Changed 14 years ago by Cloudream

Priority: majorminor

Yes, this often happens when you move mouse quickly.

comment:2 Changed 14 years ago by klaus.hartl

Milestone: TBD1.7
Owner: set to klaus.hartl
Status: newassigned

comment:3 Changed 14 years ago by klaus.hartl

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.