Skip to main content

Search and Top Navigation

#4212 closed bug (fixed)

Opened February 22, 2009 04:15PM UTC

Closed February 22, 2009 06:56PM UTC

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:
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.

Attachments (0)
Change History (3)

Changed February 22, 2009 04:55PM UTC by Cloudream comment:1

priority: majorminor

Yes, this often happens when you move mouse quickly.

Changed February 22, 2009 06:14PM UTC by klaus.hartl comment:2

milestone: TBD1.7
owner: → klaus.hartl
status: newassigned

Changed February 22, 2009 06:56PM UTC by klaus.hartl comment:3

resolution: → fixed
status: assignedclosed