Jvectormap marker placed over IE mouse
I have a problem with jvectormap in Internet Explorer only.
When I hover over a marker in the region, a label is displayed above the marker. I can still see the mouse, but I can't click the marker to open the link or whatever. So it just flickers when I move the mouse a little.
Code for displaying the label:
onMarkerLabelShow: function(event, label, index){
label.html(
'<b>'+label.html()+'</b><br />'+
markers[current_country][index].html
);
},
The thing is, if I remove the bullet text and just show the title that sits between the tags <b>
, it works fine.
Perhaps the text after is <br/>
too long? Or can I place the label for IE in other positions?
source to share
The problem is line breaks. It doesn't work correctly in IE with the br and p shortcuts, nor does it work with explicit: both.
This is a dirty workaround, but it works like a charm:
Just before calling label.html, enter the following line of code:
label.css('left',-200);
It will still work correctly in Firefox and Chrome, and there are more problems in IE.
source to share