Ticket #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@… |
| Blocking: | Blocked by: |
Description
Currently tabs (from latest SVN) binds the following function to mouseover and mouseout:
var handleState = function(state, el) {
if (el.is(':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.


Yes, this often happens when you move mouse quickly.