highslide-software/highcharts.com — Issue #667: IE9: Range selector buttons don't respond to hover
Author: highslide-software
Created: 2011-12-23 11:06:11+00:00
State: open
Labels: Bug, Highstock

See http://jsfiddle.net/Kk4F2/2/.

It may be related to mouseleave/mouseenter event handling. Apparently this mod fixes it, but should be avoided as it adds browser detection and branching in business code:

In file highstock.src.js at line 2912:
BEFORE CHANGES
================
// add the events
addEvent(label.element, 'mouseenter', function () {
label.attr(hoverState)
.css(hoverStyle);
});
addEvent(label.element, 'mouseleave', function () {
stateOptions = [normalState, hoverState, pressedState][curState];
stateStyle = [normalStyle, hoverStyle, pressedStyle][curState];
label.attr(stateOptions)
.css(stateStyle);
});
=================

AFTER CHANGES
=================
if(jQ.browser.msie) {
inAction = 'mouseover';
outAction = 'mouseout';
}else{
inAction = 'mouseenter';
outAction = 'mouseleave';
}
addEvent(label.element, inAction, function () {
label.attr(hoverState)
.css(hoverStyle);
});
addEvent(label.element, outAction, function () {
stateOptions = [normalState, hoverState, pressedState][curState];
stateStyle = [normalStyle, hoverStyle, pressedStyle][curState];
label.attr(stateOptions)
.css(stateStyle);
});