Skip to content

Commit 9cd23f8

Browse files
committed
Use display: none for IE9 workaround.
Saves a line, too!
1 parent 35ef75d commit 9cd23f8

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

d3.v2.js

Lines changed: 2 additions & 3 deletions
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") // workaround for IE9 bug
42714270
.style("visibility", "hidden")
42724271
.style("cursor", "crosshair");
42734272

@@ -4368,7 +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);
4371-
g.select(".background").style("pointer-events", "none"); // workaround for IE9 bug
4370+
g.select(".background").style("display", "none"); // workaround for IE9 bug
43724371
d3.select("body").style("cursor", eventTarget.style("cursor"));
43734372

43744373
// Notify listeners.
@@ -4493,7 +4492,7 @@ d3.svg.brush = function() {
44934492

44944493
// reset the cursor styles
44954494
g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null);
4496-
g.select(".background").style("pointer-events", "all"); // workaround for IE9 bug
4495+
g.select(".background").style("display", null); // workaround for IE9 bug
44974496
d3.select("body").style("cursor", null);
44984497

44994498
w .on("mousemove.brush", null)

0 commit comments

Comments
 (0)