Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Drilldowns Don't Respect allowPointSelect: true #5113
If you enable drilldowns for a map but also enable allowPointSelect, I would expect to be able to select and multi-select values by holding down shift, cmd etc and not drilldown. However, the drilldown's click handler doesn't check for modifier keys and it runs before click's the defaultFunction (which DOES check for the modifiers), so clicking always drills down. I'd also expect when drilling down to NOT fire select events, but that seems to happen since the default function isn't cancelled by the click handler. Lastly, when you drill back up, any points selected at the previous level from before you drilled down display with with their 'select' state styling, but reset to normal after triggering a mouseout by moving your cursor over the selected point and back out.
Demo fiddle: http://jsfiddle.net/markmsmith/x6v8Lpnz/
The check for the click event's modifier keys should be here and when drilling down it should return false to prevent incorrect selections (after issue #5112 is fixed). I've worked around the phantom select styling on drill-up by just clearing all selections when the 'drilldown' event is fired, but it would be nice to have it either clear them automatically on drill down (preferred) or have the option to preserve selections.
I was thinking that just checking for the modifier keys would be fine, since it didn't make sense to me to still select when drilling down, and hard coding them is what the default click handler does.
We're basically telling the user, if you want to have allowPointSelect AND drilldown turned on for a Point at the same time, you need to hold a modifier to do selects, since otherwise we can't know whether you intended a click to do drilldown or select. This wouldn't affect points that don't have a drilldown specified, which can still be selected without modifier keys in the usual way.
Okay, it's fixed now, please see http://jsfiddle.net/highcharts/x6v8Lpnz/2/.
What I did was to add the