Skip to content

Commit 2e83e39

Browse files
committed
An even better workaround for an IE9 bug.
It's as if IE9 is forgetting about the visibility: hidden rect, and doing *something* to it jogs its memory.
1 parent 005e177 commit 2e83e39

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

d3.v2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4267,7 +4267,6 @@ d3.svg.brush = function() {
42674267
// An invisible, mouseable area for starting a new brush.
42684268
bg.enter().append("rect")
42694269
.attr("class", "background")
4270-
.style("pointer-events", "all") // required here due to IE9 not inheriting properly
42714270
.style("visibility", "hidden")
42724271
.style("cursor", "crosshair");
42734272

@@ -4368,6 +4367,7 @@ d3.svg.brush = function() {
43684367

43694368
// Propagate the active cursor to the body for the drag duration.
43704369
g.style("pointer-events", "none").selectAll(".resize").style("display", null);
4370+
g.select(".background").style("pointer-events", null); // workaround for IE9 bug
43714371
d3.select("body").style("cursor", eventTarget.style("cursor"));
43724372

43734373
// Notify listeners.

0 commit comments

Comments
 (0)