Opened 8 years ago

Closed 8 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: onestone@…
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 8 years ago by Cloudream

  • Priority changed from major to minor

Yes, this often happens when you move mouse quickly.

comment:2 Changed 8 years ago by klaus.hartl

  • Milestone changed from TBD to 1.7
  • Owner set to klaus.hartl
  • Status changed from new to assigned

comment:3 Changed 8 years ago by klaus.hartl

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.