Skip to content

Commit 341963e

Browse files
committed
replace d3.mouse in geo hover to work around firefox bug (plotly#5525)
1 parent cc1c2b0 commit 341963e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/plots/geo/geo.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,11 @@ proto.updateFx = function(fullLayout, geoLayout) {
506506
}
507507

508508
bgRect.on('mousemove', function() {
509-
var lonlat = _this.projection.invert(d3.mouse(this));
509+
var d3EventPosition = [
510+
d3.event.offsetX,
511+
d3.event.offsetY,
512+
];
513+
var lonlat = _this.projection.invert(d3EventPosition);
510514

511515
if(!lonlat || isNaN(lonlat[0]) || isNaN(lonlat[1])) {
512516
return dragElement.unhover(gd, d3.event);

0 commit comments

Comments
 (0)