Don't preventDefault on mousedown events

This prevents focus/blur events from getting dispatched,
which was the root cause of #1295.

Fixes #1295.
This commit is contained in:
John Firebaugh
2013-05-31 14:27:37 -07:00
parent f02df04102
commit 0724e204e8
2 changed files with 2 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ iD.behavior.drag = function() {
offset = [0, 0];
}
if (touchId === null) d3_eventCancel();
if (touchId === null) d3.event.stopPropagation();
function point() {
var p = target.parentNode || surface;

3
js/lib/d3.v3.js vendored
View File

@@ -1504,8 +1504,7 @@ d3.behavior.zoom = function() {
w = d3.select(d3_window).on("mousemove.zoom", mousemove).on("mouseup.zoom", mouseup),
l = location(d3.mouse(target));
d3_window.focus();
d3_eventCancel();
d3.event.stopPropagation();
function mousemove() {
if (d3.event.which === 0) {