diff --git a/js/id/id.js b/js/id/id.js index 3d9004bfb..31ff26836 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -186,15 +186,18 @@ window.iD = function(container) { map.keybinding() .on('a', function(evt, mods) { + if (mods) return; controller.enter(iD.modes.AddArea()); }) .on('⌫.prevent_navigation', function(evt, mods) { evt.preventDefault(); }) .on('p', function(evt, mods) { + if (mods) return; controller.enter(iD.modes.AddPoint()); }) .on('l', function(evt, mods) { + if (mods) return; controller.enter(iD.modes.AddLine()); }) .on('z', function(evt, mods) { diff --git a/js/id/modes/select.js b/js/id/modes/select.js index 3b9667de3..9397b1e98 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -138,7 +138,9 @@ iD.modes.Select = function(entity) { }); surface.selectAll("*") - .filter(function (d) { return d === entity; }) + .filter(function (d) { + return d && entity && d.id === entity.id; + }) .classed('selected', true); };